Make Tilda work without DBus
[tilda-gobject.git] / tilda-controller.c
index 7361ff8..4127920 100644 (file)
@@ -15,6 +15,10 @@ tilda_controller_dbus_register_object (TildaController *self)
 
        static const gchar object_path[] = "/net/sourceforge/Tilda";
 
+       /* If DBus is not running, leave */
+       if (!dbus_connection)
+               return;
+
        dbus_g_connection_register_g_object (dbus_connection, object_path, G_OBJECT(self));
 }