From a58bb34ffbc49fbb3f1761c559b4b1bb48de65fd Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 28 Feb 2009 22:42:10 +0100 Subject: Check that interface name is provided --- gdbus/object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gdbus') 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); -- cgit v1.2.1