fix potentially dereference null pointer deteced by static analyzer. 89/55089/1
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 22 Dec 2015 00:02:27 +0000 (09:02 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Tue, 22 Dec 2015 00:02:27 +0000 (09:02 +0900)
Change-Id: I248b674c7318571bdb546f7fde7390ff455376c8

src/e_mod_quickpanel.c
src/e_mod_rotation_wl.c

index 685ab9c..49a611e 100644 (file)
@@ -413,6 +413,9 @@ _quickpanel_mover_end(Evas_Object *mover, int x, int y, unsigned int timestamp)
    md = evas_object_smart_data_get(mover);
    ec = evas_object_data_get(mover, "E_Client");
 
+   if (EINA_UNLIKELY((!ec) || (!ec->zone)))
+     return;
+
    if ((md->effect_info.accel > sensitivity) ||
        ((md->effect_info.accel > -sensitivity) && (y > ec->zone->h / 2)))
      visible = EINA_TRUE;
index bdd2d1e..0b32f0f 100644 (file)
@@ -450,7 +450,7 @@ _e_client_rotation_zone_set(E_Zone *zone)
 
         EINA_LIST_REVERSE_FOREACH(zone->comp->clients, l, ec)
           {
-             if(ec->zone != zone) continue;
+             if((!ec->zone) || (ec->zone != zone)) continue;
 
              // if this window has parent and window type isn't "E_WINDOW_TYPE_NORMAL",
              // it will be rotated when parent do rotate itself.