cbhm_helper: fix cbhm_conn NULL checking. 40/86240/1
authorHosang Kim <hosang12.kim@samsung.com>
Wed, 31 Aug 2016 07:55:03 +0000 (16:55 +0900)
committerHosang Kim <hosang12.kim@samsung.com>
Wed, 31 Aug 2016 07:59:19 +0000 (16:59 +0900)
After freeing cbhm_conn, it will be initialized to NULL.

Signed-off-by: Hosang Kim <hosang12.kim@samsung.com>
Change-Id: Icd150b061a03c87a5a850109f2e8afc69704ee82

src/modules/copypasteUI_ctxpopup/cbhm_helper.c

index 4aba0c5..3f43f54 100644 (file)
@@ -75,7 +75,7 @@ _cbhm_window_get()
 
 #ifdef HAVE_ELEMENTARY_WAYLAND
 static Eldbus_Proxy *eldbus_proxy;
-Eldbus_Connection *cbhm_conn;
+Eldbus_Connection *cbhm_conn = NULL;
 
 Eldbus_Proxy* cbhm_proxy_get()
 {
@@ -128,7 +128,10 @@ void
 cbhm_eldbus_deinit()
 {
    if (cbhm_conn)
-      eldbus_connection_unref(cbhm_conn);
+     {
+        eldbus_connection_unref(cbhm_conn);
+        cbhm_conn = NULL;
+     }
 }
 #endif /* HAVE_ELEMENTARY_WAYLAND */