zone - on free - dont del things we may later access during free

del them after we might access them... :) fix seg.
@fix
devs/bu5hm4n/swipe_real
Carsten Haitzler 2 years ago
parent 19f17e4aef
commit 7d2be9edcc
  1. 15
      src/bin/e_zone.c

@ -1467,16 +1467,19 @@ _e_zone_free(E_Zone *zone)
}
/* free desks */
for (x = 0; x < zone->desk_x_count; x++)
{
for (y = 0; y < zone->desk_y_count; y++)
e_object_del(E_OBJECT(zone->desks[x + (y * zone->desk_x_count)]));
}
while (zone->obstacles)
{
E_Object *obs = (void*)EINA_INLIST_CONTAINER_GET(zone->obstacles, E_Zone_Obstacle);
E_Object *obs = (void *)EINA_INLIST_CONTAINER_GET(zone->obstacles, E_Zone_Obstacle);
e_object_del(obs);
}
for (x = 0; x < zone->desk_x_count; x++)
{
for (y = 0; y < zone->desk_y_count; y++)
{
e_object_del(E_OBJECT(zone->desks[x + (y * zone->desk_x_count)]));
zone->desks[x + (y * zone->desk_x_count)] = NULL;
}
}
free(zone->desks);
free(zone->randr2_id);
free(zone);

Loading…
Cancel
Save