fix e_exec crash

ticket #1525


SVN revision: 76778
This commit is contained in:
Mike Blumenkrantz 2012-09-18 04:36:01 +00:00
parent 8d8f697a3f
commit c60be515e8
1 changed files with 17 additions and 14 deletions

View File

@ -103,25 +103,28 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
if ((!desktop) && (!exec)) return NULL; if ((!desktop) && (!exec)) return NULL;
single = eina_hash_find(desktop->x, "X-Enlightenment-Single-Instance"); if (desktop)
if (single)
{ {
if ((!strcasecmp(single, "true")) || single = eina_hash_find(desktop->x, "X-Enlightenment-Single-Instance");
(!strcasecmp(single, "yes"))|| if (single)
(!strcasecmp(single, "1")))
{ {
Eina_List *l; if ((!strcasecmp(single, "true")) ||
E_Border *bd; (!strcasecmp(single, "yes"))||
(!strcasecmp(single, "1")))
EINA_LIST_FOREACH(e_border_client_list(), l, bd)
{ {
if (bd->desktop == desktop) Eina_List *l;
E_Border *bd;
EINA_LIST_FOREACH(e_border_client_list(), l, bd)
{ {
if (bd) if (bd->desktop == desktop)
{ {
if (!bd->focused) e_border_activate(bd, EINA_TRUE); if (bd)
else e_border_raise(bd); {
return NULL; if (!bd->focused) e_border_activate(bd, EINA_TRUE);
else e_border_raise(bd);
return NULL;
}
} }
} }
} }