edbus: prevent segv
authorSebastian Dransfeld <sd@tango.flipp.net>
Fri, 2 Nov 2012 02:49:24 +0000 (02:49 +0000)
committerSebastian Dransfeld <sd@tango.flipp.net>
Fri, 2 Nov 2012 02:49:24 +0000 (02:49 +0000)
SVN revision: 78816

src/lib/edbus_core.c

index d3a59f6..4e8fdf8 100644 (file)
@@ -684,6 +684,7 @@ cb_watch_toggle(DBusWatch *watch, void *data)
 {
    EDBus_Handler_Data *hd;
    hd = dbus_watch_get_data(watch);
+   if (!hd) return;
    DBG("cb_watch_toggle %d", hd->fd);
 
    hd->enabled = dbus_watch_get_enabled(watch);