power: Fix crasher when logind isn't available

We need to check for the array being non-NULL before trying to
destroy it.

https://bugzilla.gnome.org/show_bug.cgi?id=732836