summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorBryce Harrington <bryce@bryceharrington.org>2018-09-14 11:47:52 +0900
committerHermet Park <hermetpark@gmail.com>2018-11-21 20:55:13 +0900
commit3f957a9bd0f46c0f0771b3ebddcae4462e56e050 (patch)
tree4fb1beb348371d4a04ddbf35dc2d039451e1341b /src/lib/evas
parentcd6e7fe685824db9225da447acf3ea6ccaa627cd (diff)
evas vg: Check for OOM when setting root node in a vg canvas
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index 040d2e82cb..c476b0eb58 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -160,8 +160,14 @@ _efl_canvas_vg_object_root_node_set(Eo *obj, Efl_Canvas_Vg_Object_Data *pd, Efl_
160 if (root_node) 160 if (root_node)
161 { 161 {
162 if (!pd->user_entry) 162 if (!pd->user_entry)
163 pd->user_entry = malloc(sizeof(User_Vg_Entry)); 163 {
164 164 pd->user_entry = malloc(sizeof(User_Vg_Entry));
165 if (!pd->user_entry)
166 {
167 ERR("Failed to alloc user entry data while setting root node");
168 return;
169 }
170 }
165 pd->user_entry->w = pd->user_entry->h = 0; 171 pd->user_entry->w = pd->user_entry->h = 0;
166 pd->user_entry->root = root_node; 172 pd->user_entry->root = root_node;
167 173