Check that interface name is provided
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 28 Feb 2009 21:42:10 +0000 (22:42 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 28 Feb 2009 21:44:38 +0000 (22:44 +0100)
gdbus/object.c

index 0786aeb..2823054 100644 (file)
@@ -224,6 +224,9 @@ static struct interface_data *find_interface(GSList *interfaces,
 {
        GSList *list;
 
+       if (!name)
+               return NULL;
+
        for (list = interfaces; list; list = list->next) {
                struct interface_data *iface = list->data;
                if (!strcmp(name, iface->name))
@@ -391,7 +394,6 @@ static gboolean check_signal(DBusConnection *conn, const char *path,
        }
 
        iface = find_interface(data->interfaces, interface);
-
        if (!iface) {
                error("dbus_connection_emit_signal: %s does not implement %s",
                                path, interface);