evas: Fix rare crash in object destruction
The COW object may have not been created if the object could not be created. Example: a window failed to open because the engine could not create a surface.
This commit is contained in:
parent
1e1a611fdb
commit
d8f59d24c4
|
@ -166,8 +166,11 @@ _efl_gfx_map_efl_object_constructor(Eo *eo_obj, Efl_Gfx_Map_Data *pd)
|
|||
EOLIAN static void
|
||||
_efl_gfx_map_efl_object_destructor(Eo *eo_obj, Efl_Gfx_Map_Data *pd)
|
||||
{
|
||||
_map_ops_clean(eo_obj, pd);
|
||||
eina_cow_free(gfx_map_cow, (const Eina_Cow_Data **) &pd->cow);
|
||||
if (pd->cow)
|
||||
{
|
||||
_map_ops_clean(eo_obj, pd);
|
||||
eina_cow_free(gfx_map_cow, (const Eina_Cow_Data **) &pd->cow);
|
||||
}
|
||||
efl_destructor(efl_super(eo_obj, MY_CLASS));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue