Don't segfault if dbus is not running.
authorRoy Marples <roy@marples.name>
Sat, 25 Jul 2009 22:07:45 +0000 (22:07 +0000)
committerRoy Marples <roy@marples.name>
Sat, 25 Jul 2009 22:07:45 +0000 (22:07 +0000)
src/dhcpcd-gtk/main.c

index d17bf947bed5dc437f80e65b1b00d799a477258c..f68cb1633b3d9e72e1a2a0362a634f7b3d16534b 100644 (file)
@@ -411,8 +411,10 @@ main(int argc, char *argv[])
 
        g_message(_("Connecting ..."));
        con = dhcpcd_open(&error);
-       if (con ==  NULL)
+       if (con ==  NULL) {
                g_critical("libdhcpcd: %s", error);
+               exit(EXIT_FAILURE);
+       }
 
        gtk_status_icon_set_tooltip(status_icon, _("Triggering dhcpcd ..."));
        online = false;