forked from enlightenment/efl
evas vg: get rid of memory leak.
alloc mem only if it didn't alloc'd yet. @fix
This commit is contained in:
parent
a99f337413
commit
78d1fdd746
|
@ -164,8 +164,12 @@ _efl_canvas_vg_object_root_node_set(Eo *obj, Efl_Canvas_Vg_Object_Data *pd, Efl_
|
||||||
|
|
||||||
if (root_node)
|
if (root_node)
|
||||||
{
|
{
|
||||||
pd->user_entry = calloc(1, sizeof(User_Vg_Entry));
|
if (!pd->user_entry)
|
||||||
|
pd->user_entry = malloc(sizeof(User_Vg_Entry));
|
||||||
|
|
||||||
|
pd->user_entry->w = pd->user_entry->h = 0;
|
||||||
pd->user_entry->root = root_node;
|
pd->user_entry->root = root_node;
|
||||||
|
|
||||||
// set the parent so that vg canvas can render it.
|
// set the parent so that vg canvas can render it.
|
||||||
efl_parent_set(pd->user_entry->root, pd->root);
|
efl_parent_set(pd->user_entry->root, pd->root);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue