pager - try a fix for a pager segv - cant reproduce though

a bit of i dotting and t crossing as to try stop this from happening
again
This commit is contained in:
Carsten Haitzler 2020-10-17 21:00:30 +01:00
parent 029df828ea
commit 0093c9baa1
1 changed files with 6 additions and 4 deletions

View File

@ -337,9 +337,9 @@ _pager_recalc(void *data)
int w, h, zw, zh, w2, h2; int w, h, zw, zh, w2, h2;
E_Gadcon_Orient orient; E_Gadcon_Orient orient;
p->recalc = NULL;
if (!p->inst || !p->inst->gcc || !p->inst->gcc->gadcon) return; if (!p->inst || !p->inst->gcc || !p->inst->gcc->gadcon) return;
p->recalc = NULL;
zw = p->zone->w; zh = p->zone->h; zw = p->zone->w; zh = p->zone->h;
pd = eina_list_data_get(p->desks); pd = eina_list_data_get(p->desks);
if (!pd) return; if (!pd) return;
@ -379,7 +379,7 @@ _pager_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
{ {
Pager *p = data; Pager *p = data;
if (!p->recalc) if (p->recalc) ecore_job_del(p->recalc);
p->recalc = ecore_job_add(_pager_recalc, p); p->recalc = ecore_job_add(_pager_recalc, p);
} }
@ -404,10 +404,12 @@ _pager_new(Evas *evas, E_Zone *zone, E_Gadcon *gc, Instance *inst)
static void static void
_pager_free(Pager *p) _pager_free(Pager *p)
{ {
pagers = eina_list_remove(pagers, p);
_pager_empty(p); _pager_empty(p);
evas_object_del(p->o_table); evas_object_del(p->o_table);
p->o_table = NULL;
ecore_job_del(p->recalc); ecore_job_del(p->recalc);
pagers = eina_list_remove(pagers, p); p->recalc = NULL;
free(p); free(p);
} }