[SDL_Tizen] Fix svace issue 07/190307/2 accepted/tizen/unified/20181001.092551 submit/tizen/20181001.031614
authorhuiyu.eun <huiyu.eun@samsung.com>
Mon, 1 Oct 2018 02:17:50 +0000 (11:17 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Mon, 1 Oct 2018 03:02:21 +0000 (12:02 +0900)
Change-Id: I9d519d3a77506bb0fddeea9d0eedce7e5ef8baff
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/video/tizen/SDL_tizenwindow.c

index d8f9fe9..c25f6a0 100755 (executable)
@@ -1226,6 +1226,9 @@ _tizen_cb_event_window_visibility_change(void *data, int type, void *event)
     ev = event;
     ew = ecore_wl2_display_window_find(wl2_display, ev->win);
     window = Tizen_FindWindow(_this, ew);
+    if (!window) {
+        return ECORE_CALLBACK_CANCEL;
+    }
 
     SDL_SendWindowEvent(window, SDL_WINDOWEVENT_SHOWN, 0, 0);
     SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0);
@@ -1246,7 +1249,14 @@ _tizen_cb_window_configure(void *data, int type EINA_UNUSED, void *event)
    ev = event;
    ew = ecore_wl2_display_window_find(wl2_display, ev->win);
    window = Tizen_FindWindow(_this, ew);
+   if (!window) {
+       return ECORE_CALLBACK_CANCEL;
+   }
+
    wind = window->driverdata;
+   if (!wind) {
+       return ECORE_CALLBACK_CANCEL;
+   }
 
    if (wind->rotation_supported == 0){
       return ECORE_CALLBACK_PASS_ON;
@@ -1273,7 +1283,14 @@ _tizen_cb_event_window_rotate(void *data, int type EINA_UNUSED, void *event)
 
     ew = ecore_wl2_display_window_find(wl2_display, ev->win);
     window = Tizen_FindWindow(_this, ew);
+    if (!window) {
+        return ECORE_CALLBACK_CANCEL;
+    }
+
     wind = window->driverdata;
+    if (!wind) {
+        return ECORE_CALLBACK_CANCEL;
+    }
 
     /* set ecore_wl2 window rotation */
     wind->rotation = ev->angle;