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:
Christopher Michael 2020-03-18 13:28:52 -04:00
parent 385d26d961
commit d85d0194a9
1 changed files with 1 additions and 1 deletions

View File

@ -3065,7 +3065,7 @@ e_gadget_editor_add(Evas_Object *parent, Evas_Object *site)
e_gadget_site_gadget_add(tempsite, type, 1);
ZGS_GET(tempsite);
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);