Check value before accessing pointer 01/33701/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 5 Nov 2014 00:11:26 +0000 (09:11 +0900)
committerLi Zhang <li2012.zhang@samsung.com>
Wed, 14 Jan 2015 02:32:35 +0000 (10:32 +0800)
[model] All
[binary_type] PDA
[customer] OPEN
[issue#] N/A
[problem] No check NULL before accessing pointer
[cause] N/A
[solution] Add code to check value before accessing
[team] Input Framework
[request] N/A
[horizontal_expansion] N/A

Change-Id: I405478d5ae1d54d4151243ca34fe9f74f8785b74

ism/extras/efl_panel/isf_panel_efl.cpp

index 63c9bd64ada35487d327c5212c7109b1b77015f6..7209ded1e9eb571692a955158e59a8dcfc1ff672 100644 (file)
@@ -6554,12 +6554,26 @@ int main (int argc, char *argv [])
         LOGW ("bt_deinitialize failed: %d", ret);
 #endif
 
-    ecore_event_handler_del (xclient_message_handler);
-    ecore_event_handler_del (xwindow_property_handler);
-    ecore_event_handler_del (xwindow_focus_out_handler);
+    if (xclient_message_handler) {
+        ecore_event_handler_del (xclient_message_handler);
+        xclient_message_handler = NULL;
+    }
+
+    if (xwindow_property_handler) {
+        ecore_event_handler_del (xwindow_property_handler);
+        xwindow_property_handler = NULL;
+    }
 
-    if (helper_manager_handler)
+    if (xwindow_focus_out_handler) {
+        ecore_event_handler_del (xwindow_focus_out_handler);
+        xwindow_focus_out_handler = NULL;
+    }
+
+    if (helper_manager_handler) {
         ecore_main_fd_handler_del (helper_manager_handler);
+        helper_manager_handler = NULL;
+    }
+
     for (unsigned int ii = 0; ii < _read_handler_list.size (); ++ii) {
         ecore_main_fd_handler_del (_read_handler_list[ii]);
     }