Fix issue detected static analysis tool 96/220396/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 18 Dec 2019 05:09:33 +0000 (14:09 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 9 Jan 2020 00:58:08 +0000 (09:58 +0900)
Change-Id: I114a3196f039388211e9461c12c7fdac958592a7
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/e_mod_input_panel.c

index 7805637..e3f3a71 100644 (file)
@@ -90,7 +90,7 @@ _e_input_panel_surface_get(E_Client *ec)
 
    EINA_LIST_FOREACH_SAFE(g_input_panel->surfaces, l, l_next, ips)
      {
-        if (!ips->ec) continue;
+        if (!ips || !ips->ec) continue;
         if (ips->ec == ec)
           {
              return ips;
@@ -1236,7 +1236,7 @@ e_input_panel_visibility_change(Eina_Bool visible)
 
    EINA_LIST_FOREACH(g_input_panel->surfaces, l, ips)
      {
-        if (!ips->ec) continue;
+        if (!ips || !ips->ec) continue;
         ips->showing = visible;
         _e_input_panel_surface_visible_update(ips);
      }
@@ -1256,7 +1256,7 @@ e_input_panel_client_find(E_Client *ec)
 
    EINA_LIST_FOREACH(g_input_panel->surfaces, l, ips)
      {
-        if (!ips->ec) continue;
+        if (!ips || !ips->ec) continue;
         if (ips->ec == ec) return EINA_TRUE;
      }
 
@@ -1276,7 +1276,7 @@ e_input_panel_client_geometry_get(E_Client *ec, int *x, int *y, int *w, int *h)
 
     EINA_LIST_FOREACH(g_input_panel->surfaces, l, ips)
     {
-        if (!ips->ec) continue;
+        if (!ips || !ips->ec) continue;
         if (ips->ec == ec || !ec)
           {
             angle = ips->ec->e.state.rot.ang.next < 0 ?
@@ -1315,6 +1315,8 @@ _e_input_panel_idle_enter(void *data)
 
    EINA_LIST_FOREACH(g_input_panel->surfaces, l, ips)
      {
+        if (!ips) continue;
+
         if (ips->need_show)
           {
              if (!_e_input_panel_is_effect_running(ips->ec))
@@ -1549,7 +1551,7 @@ e_input_panel_floating_position_set(int x, int y)
 
    EINA_LIST_FOREACH_SAFE(g_input_panel->surfaces, l, l_next, ips)
      {
-        if (!ips->ec) continue;
+        if (!ips || !ips->ec) continue;
         if (ips->ec->frame && ips->ec->vkbd.floating)
           {
              floating_ec = ips->ec;
@@ -1599,7 +1601,7 @@ e_input_panel_surface_destroy(E_Client *ec)
 
    EINA_LIST_FOREACH_SAFE(g_input_panel->surfaces, l, l_next, ips)
      {
-        if (!ips->ec) continue;
+        if (!ips || !ips->ec) continue;
         if (ips->ec == ec)
           {
              g_input_panel->surfaces = eina_list_remove_list(g_input_panel->surfaces, l);