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);