From b8481a1eb474bd60c9fc0cffbcbf0f8da76c1c9d 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(-) diff --git a/gdbus/object.c b/gdbus/object.c index 0786aebe..2823054b 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