Add null check for when get window angle 40/107840/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.141817 accepted/tizen/3.0.m2/wearable/20170104.142437 accepted/tizen/3.0/common/20170102.143317 accepted/tizen/3.0/mobile/20170102.094659 accepted/tizen/3.0/wearable/20170102.094802 submit/tizen_3.0.m2/20170104.093751 submit/tizen_3.0/20170102.015506
authorJunsuChoi <jsuya.choi@samsung.com>
Fri, 30 Dec 2016 06:32:11 +0000 (15:32 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 30 Dec 2016 06:32:11 +0000 (15:32 +0900)
   add null check before using e_zone_current_get's result variable.
   when get window angle

Change-Id: Ief734dfb94e74c0e7e535b69ea0014e0431e470f

src/e_screen_reader_gestures.c

index 9389380..6d912ac 100644 (file)
@@ -187,12 +187,17 @@ int __get_window_angle(void)
    E_Comp_Wl_Client_Data *cdata;
 
    zone = e_zone_current_get();
+   if(!zone)
+     {
+        DEBUG("Fail to found zone");
+        return cover->angle;
+     }
 
    E_CLIENT_REVERSE_FOREACH(ec)
      {
         if (e_object_is_del(E_OBJECT(ec))) continue;
         if (e_client_util_ignored_get(ec)) continue;
-        if (zone && ec->zone != zone) continue;
+        if (ec->zone != zone) continue;
         if (!ec->frame) continue;
         cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
         if (cdata && cdata->sub.data) continue;