Index: /trunk/src/VBox/Main/src-server/linux/HostPowerLinux.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/linux/HostPowerLinux.cpp	(revision 57641)
+++ /trunk/src/VBox/Main/src-server/linux/HostPowerLinux.cpp	(revision 57642)
@@ -23,5 +23,5 @@
 #include <iprt/time.h>
 
-static bool checkDBusError(DBusError *pError, DBusConnection *pConnection)
+static bool checkDBusError(DBusError *pError, DBusConnection **pConnection)
 {
     if (dbus_error_is_set(pError))
@@ -29,8 +29,12 @@
         LogRel(("HostPowerServiceLinux: DBus connection Error (%s)\n", pError->message));
         dbus_error_free(pError);
-        /* Close the socket or whatever underlying the connection. */
-        dbus_connection_close(pConnection);
-        /* Free in-process resources used for the now-closed connection. */
-        dbus_connection_unref(pConnection);
+        if (*pConnection)
+        {
+            /* Close the socket or whatever underlying the connection. */
+            dbus_connection_close(*pConnection);
+            /* Free in-process resources used for the now-closed connection. */
+            dbus_connection_unref(*pConnection);
+            *pConnection = NULL;
+        }
         return true;
     }
@@ -59,5 +63,5 @@
      * running as the user anyway" (see session.conf.in in the DBus sources). */
     mpConnection = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error);
-    if (checkDBusError(&error, mpConnection))
+    if (checkDBusError(&error, &mpConnection))
         return;
     /* We do not want to exit(1) if the connection is broken. */
@@ -69,5 +73,5 @@
     dbus_bus_add_match(mpConnection, "type='signal',interface='org.freedesktop.UPower'", &error);
     dbus_connection_flush(mpConnection);
-    if (checkDBusError(&error, mpConnection))
+    if (checkDBusError(&error, &mpConnection))
         return;
     /* Create the new worker thread. */
