forked from enlightenment/enlightenment
e_gadget: Check for valid gadget config before trying to remove it
Should fix crash when trying to add a gadget to a gadget bar https://nopaste.linux-dev.org/?1295161
This commit is contained in:
parent
385d26d961
commit
d85d0194a9
|
@ -3065,7 +3065,7 @@ e_gadget_editor_add(Evas_Object *parent, Evas_Object *site)
|
||||||
e_gadget_site_gadget_add(tempsite, type, 1);
|
e_gadget_site_gadget_add(tempsite, type, 1);
|
||||||
ZGS_GET(tempsite);
|
ZGS_GET(tempsite);
|
||||||
zgc = eina_list_last_data_get(zgs->gadgets);
|
zgc = eina_list_last_data_get(zgs->gadgets);
|
||||||
if (!zgc->gadget) _gadget_remove(zgc);
|
if ((zgc) && (!zgc->gadget)) _gadget_remove(zgc);
|
||||||
}
|
}
|
||||||
eina_iterator_free(it);
|
eina_iterator_free(it);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue