edje: add some null checks for nonexistent objects
authorMike Blumenkrantz <zmike@samsung.com>
Fri, 19 Jul 2019 19:43:21 +0000 (15:43 -0400)
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>
Tue, 23 Jul 2019 05:04:43 +0000 (14:04 +0900)
minor cleanup to fix EVAS_DEBUG_ABORT usage

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9361

src/lib/edje/edje_entry.c
src/lib/edje/edje_load.c

index 8255728..2e283a1 100644 (file)
@@ -3376,9 +3376,9 @@ _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp, Ecore_IMF_Context *ic)
 
    if (rp->part->entry_mode >= EDJE_ENTRY_EDIT_MODE_EDITABLE)
      {
-        evas_object_show(en->cursor_bg);
-        evas_object_show(en->cursor_fg);
-        evas_object_show(en->cursor_fg2);
+        if (en->cursor_bg) evas_object_show(en->cursor_bg);
+        if (en->cursor_fg) evas_object_show(en->cursor_fg);
+        if (en->cursor_fg2) evas_object_show(en->cursor_fg2);
         en->input_panel_enable = EINA_TRUE;
 
 #ifdef HAVE_ECORE_IMF
index 244d643..497f409 100644 (file)
@@ -1421,7 +1421,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
              for (i = 0; i < ed->table_parts_size; i++)
                {
                   rp = ed->table_parts[i];
-                  evas_object_show(rp->object);
+                  /* SPACER parts do not have objects */
+                  if (rp->object) evas_object_show(rp->object);
                   if (_edje_block_break(ed)) break;
                   if (rp->drag)
                     {