Make Tilda work without DBus
[tilda-gobject.git] / tilda-window.c
index 351efa0..705a80a 100644 (file)
@@ -346,7 +346,11 @@ tilda_window_dbus_register_object (TildaWindow *self)
 
        gchar *object_path;
 
-       // Register this object with DBus
+       /* If DBus is not running, leave */
+       if (!dbus_connection)
+               return;
+
+       /* Register this object with DBus */
        object_path = g_strdup_printf ("/net/sourceforge/Tilda/Window%d", self->number);
        dbus_g_connection_register_g_object (dbus_connection, object_path, G_OBJECT(self));
        g_free (object_path);