From c059f209d8bcffc3432ac67ea9217820de799e21 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 28 Feb 2009 22:42:10 +0100 Subject: [PATCH] Check that interface name is provided --- gdbus/object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdbus/object.c b/gdbus/object.c index 0786aeb..2823054 100644 --- a/gdbus/object.c +++ b/gdbus/object.c @@ -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); -- 2.7.4