fix ibox crash when border hasn't been assigned to a zone

This commit is contained in:
Mike Blumenkrantz 2013-03-26 11:51:40 +00:00
parent 7e1843207c
commit 1f0a8801b5
1 changed files with 16 additions and 17 deletions

View File

@ -983,17 +983,17 @@ atend:
static Eina_Bool
_ibox_cb_event_border_add(void *data __UNUSED__, int type __UNUSED__, void *event)
{
E_Event_Border_Add *ev;
E_Event_Border_Add *ev = event;
IBox *b;
IBox_Icon *ic;
E_Desk *desk;
ev = event;
/* add if iconic */
desk = e_desk_current_get(ev->border->zone);
if (ev->border->iconic)
{
Eina_List *ibox;
/* add if iconic */
if (!ev->border->iconic) return ECORE_CALLBACK_RENEW;
if (!ev->border->zone) return ECORE_CALLBACK_RENEW;
desk = e_desk_current_get(ev->border->zone);
ibox = _ibox_zone_find(ev->border->zone);
EINA_LIST_FREE(ibox, b)
{
@ -1007,7 +1007,6 @@ _ibox_cb_event_border_add(void *data __UNUSED__, int type __UNUSED__, void *even
_ibox_resize_handle(b);
_gc_orient(b->inst->gcc, -1);
}
}
return ECORE_CALLBACK_PASS_ON;
}