e_comp_object: add checking null for reducing error log 17/283117/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 17 Oct 2022 03:32:59 +0000 (12:32 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 18 Oct 2022 07:25:39 +0000 (16:25 +0900)
image object and shadow object can be null because it is created
in intercept show callback.

Change-Id: If83bba9c35abeca0d71d59a5f9416717e2f926e3

src/bin/e_comp_object.c

index 4480a58e8456e3c556bee416fbabe87b0bdf65bb..10ed83483e4c41531033fa19aa320394627a4c1c 100644 (file)
@@ -5545,6 +5545,8 @@ e_comp_object_alpha_set(Evas_Object *obj, Eina_Bool alpha)
    cw->user_alpha_set = EINA_TRUE;
    cw->user_alpha = alpha;
 
+   if (!cw->obj) return;
+
    if (alpha == evas_object_image_alpha_get(cw->obj)) return;
 
    evas_object_image_alpha_set(cw->obj, alpha);
@@ -5888,7 +5890,8 @@ e_comp_object_content_set(Evas_Object *obj,
    evas_object_name_set(cw->obj, "cw->obj");
    _e_comp_object_alpha_set(cw);
 
-   _e_comp_object_shadow_setup(cw);
+   if (cw->shobj)
+     _e_comp_object_shadow_setup(cw);
 
    return EINA_TRUE;
 }
@@ -5949,7 +5952,8 @@ e_comp_object_content_unset(Evas_Object *obj)
    evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888);
    _e_comp_object_alpha_set(cw);
 
-   _e_comp_object_shadow_setup(cw);
+   if (cw->shobj)
+     _e_comp_object_shadow_setup(cw);
 
    if (cw->visible)
      {