Ethumb: test if unique_name is not null, If I kill the daemon right after it is start...
authorwatchwolf <watchwolf@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 25 Nov 2009 12:43:27 +0000 (12:43 +0000)
committerwatchwolf <watchwolf@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 25 Nov 2009 12:43:27 +0000 (12:43 +0000)
git-svn-id: https://svn.enlightenment.org/svn/e/trunk/ethumb@43971 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/client/Ethumb_Client.c

index 0cfd046..f41fb83 100644 (file)
@@ -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)