From: watchwolf Date: Wed, 25 Nov 2009 12:43:27 +0000 (+0000) Subject: Ethumb: test if unique_name is not null, If I kill the daemon right after it is start... X-Git-Tag: 2.0_alpha~28^2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6507cc9e6a6de00fa4dc118bef40d3560dc3645;p=framework%2Fuifw%2Fethumb.git Ethumb: test if unique_name is not null, If I kill the daemon right after it is started, I have a segv. This patch fix it. git-svn-id: https://svn.enlightenment.org/svn/e/trunk/ethumb@43971 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/client/Ethumb_Client.c b/src/lib/client/Ethumb_Client.c index 0cfd046..f41fb83 100644 --- a/src/lib/client/Ethumb_Client.c +++ b/src/lib/client/Ethumb_Client.c @@ -252,6 +252,8 @@ _ethumb_client_name_owner_changed(void *data, DBusMessage *msg) return; } + if(!from || !name) + return ; if (strcmp(name, _ethumb_dbus_bus_name) != 0) return; @@ -260,10 +262,10 @@ _ethumb_client_name_owner_changed(void *data, DBusMessage *msg) if (from[0] != '\0' && to[0] == '\0') { DBG("exit ethumbd at %s", from); - if (strcmp(client->unique_name, from) != 0) + if (client->unique_name && strcmp(client->unique_name, from) != 0) WRN("%s was not the known name %s, ignored.", from, client->unique_name); - else + else if(client->unique_name) { ERR("server exit!!!"); if (client->die.cb)