summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_smart.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 15:12:49 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 18:37:05 +0900
commita92186be6ab7ba6b8ba0b2bedeaec51dcb4a3898 (patch)
treec22e99af65360feb242ead4bccd12acee605d424 /src/lib/edje/edje_smart.c
parentf2b5b00ca204e8a0b8c4ab671f60088da4edfca3 (diff)
ecore/edje/elm: Fix a few WRN from calls to NULL
This fixes some of the warnings generated by calling functions on NULL objects. One of the main remaining points is to avoid unwanted warnings on non-existing parts. Ref T6326
Diffstat (limited to 'src/lib/edje/edje_smart.c')
-rw-r--r--src/lib/edje/edje_smart.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index ae038fb..6b4ed89 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -182,13 +182,21 @@ _efl_canvas_layout_efl_gfx_position_set(Eo *obj, Edje *ed, Eina_Position2D pos)
182 ep = ed->table_parts[i]; 182 ep = ed->table_parts[i];
183 if ((ep->type == EDJE_RP_TYPE_TEXT) && (ep->typedata.text)) 183 if ((ep->type == EDJE_RP_TYPE_TEXT) && (ep->typedata.text))
184 { 184 {
185 evas_object_move(ep->object, 185 if (ep->object)
186 ed->x + ep->x + ep->typedata.text->offset.x, 186 evas_object_move(ep->object,
187 ed->y + ep->y + ep->typedata.text->offset.y); 187 ed->x + ep->x + ep->typedata.text->offset.x,
188 ed->y + ep->y + ep->typedata.text->offset.y);
189 else if (ep->type != EFL_CANVAS_LAYOUT_PART_TYPE_NONE)
190 WRN("No object for part '%s' in group '%s'",
191 ep->part ? ep->part->name : "<invalid>", ed->group);
188 } 192 }
189 else 193 else
190 { 194 {
191 evas_object_move(ep->object, ed->x + ep->x, ed->y + ep->y); 195 if (ep->object)
196 evas_object_move(ep->object, ed->x + ep->x, ed->y + ep->y);
197 else if (ep->type != EFL_CANVAS_LAYOUT_PART_TYPE_NONE)
198 WRN("No object for part '%s' in group '%s'",
199 ep->part ? ep->part->name : "<invalid>", ed->group);
192 if ((ep->type == EDJE_RP_TYPE_SWALLOW) && 200 if ((ep->type == EDJE_RP_TYPE_SWALLOW) &&
193 (ep->typedata.swallow)) 201 (ep->typedata.swallow))
194 { 202 {