e_comp_wl: add checking if e_comp->pointer is null 82/293182/1
authorduna.oh <duna.oh@samsung.com>
Mon, 22 May 2023 05:44:29 +0000 (14:44 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 22 May 2023 07:42:57 +0000 (16:42 +0900)
Change-Id: I9967ef30abb72dd97d59f2bc65b3287e06e3f576

src/bin/e_comp_wl.c
src/bin/e_pointer.c

index d2d6f08..37e0e7c 100644 (file)
@@ -911,7 +911,8 @@ _e_comp_wl_cursor_reload(E_Client *ec)
    uint32_t serial;
    int cx, cy, px, py;
 
-   if (e_comp->pointer->o_ptr && (!evas_object_visible_get(e_comp->pointer->o_ptr)))
+   if (e_comp->pointer && e_comp->pointer->o_ptr &&
+       !evas_object_visible_get(e_comp->pointer->o_ptr))
      e_pointer_object_set(e_comp->pointer, NULL, 0, 0);
 
    if (!ec) return;
@@ -1870,8 +1871,7 @@ e_comp_wl_feed_focus_in(E_Client *ec)
       ecore_timer_add(((e_config->xkb.delay_held_key_input_to_focus)/1000.0),
                       (Ecore_Task_Cb)_e_comp_wl_evas_cb_focus_in_timer, ec);
    int rotation = ec->e.state.rot.ang.curr;
-   if (e_comp->pointer->rotation != rotation)
-     e_pointer_rotation_set(e_comp->pointer, rotation);
+   e_pointer_rotation_set(e_comp->pointer, rotation);
 }
 
 static void
@@ -2499,8 +2499,7 @@ _e_comp_wl_cb_client_rot_change_end(void *d EINA_UNUSED, int t EINA_UNUSED, E_Ev
    if (!focused_ec) return ECORE_CALLBACK_PASS_ON;
 
    rotation = focused_ec->e.state.rot.ang.curr;
-   if (e_comp->pointer->rotation != rotation)
-     e_pointer_rotation_set(e_comp->pointer, rotation);
+   e_pointer_rotation_set(e_comp->pointer, rotation);
 
    return ECORE_CALLBACK_PASS_ON;
 }
index 5beca85..8fdce91 100644 (file)
@@ -414,6 +414,7 @@ e_pointer_rotation_set(E_Pointer *ptr, int rotation)
    const Eina_List *l;
    E_Input_Device *dev;
 
+   EINA_SAFETY_ON_NULL_RETURN(ptr);
    if (ptr->rotation == rotation) return;
 
    ptr->rotation = rotation;