summaryrefslogtreecommitdiff
path: root/legacy/ethumb
diff options
context:
space:
mode:
authorJonathan Atton <jonathan.atton@gmail.com>2009-11-25 12:43:27 +0000
committerJonathan Atton <jonathan.atton@gmail.com>2009-11-25 12:43:27 +0000
commit3cadaace4f232dc116cf2ffcc2873d14f3e39314 (patch)
tree93d166ef80128b4ad1612a38ee386db4d970acfe /legacy/ethumb
parent521c89df415242a8ceb8706be6982111ed123e98 (diff)
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.
SVN revision: 43971
Diffstat (limited to 'legacy/ethumb')
-rw-r--r--legacy/ethumb/src/lib/client/Ethumb_Client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/legacy/ethumb/src/lib/client/Ethumb_Client.c b/legacy/ethumb/src/lib/client/Ethumb_Client.c
index 0cfd046411..f41fb83b97 100644
--- a/legacy/ethumb/src/lib/client/Ethumb_Client.c
+++ b/legacy/ethumb/src/lib/client/Ethumb_Client.c
@@ -252,6 +252,8 @@ _ethumb_client_name_owner_changed(void *data, DBusMessage *msg)
252 return; 252 return;
253 } 253 }
254 254
255 if(!from || !name)
256 return ;
255 if (strcmp(name, _ethumb_dbus_bus_name) != 0) 257 if (strcmp(name, _ethumb_dbus_bus_name) != 0)
256 return; 258 return;
257 259
@@ -260,10 +262,10 @@ _ethumb_client_name_owner_changed(void *data, DBusMessage *msg)
260 if (from[0] != '\0' && to[0] == '\0') 262 if (from[0] != '\0' && to[0] == '\0')
261 { 263 {
262 DBG("exit ethumbd at %s", from); 264 DBG("exit ethumbd at %s", from);
263 if (strcmp(client->unique_name, from) != 0) 265 if (client->unique_name && strcmp(client->unique_name, from) != 0)
264 WRN("%s was not the known name %s, ignored.", 266 WRN("%s was not the known name %s, ignored.",
265 from, client->unique_name); 267 from, client->unique_name);
266 else 268 else if(client->unique_name)
267 { 269 {
268 ERR("server exit!!!"); 270 ERR("server exit!!!");
269 if (client->die.cb) 271 if (client->die.cb)