summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2017-02-27 17:29:33 +0900
committerHwanKyu Jhun <h.jhun@samsung.com>2017-02-27 00:33:16 -0800
commit7945614beaa50b35324e2d5d515fc5108d6e9901 (patch)
treea968b942d85a07c93952b4d14890f8024fc868e1
parent1a7a5d000173a1dbefbdfc2b97dd44b4de9a382b (diff)
downloadscreen-connector-7945614beaa50b35324e2d5d515fc5108d6e9901.tar.gz
screen-connector-7945614beaa50b35324e2d5d515fc5108d6e9901.tar.bz2
screen-connector-7945614beaa50b35324e2d5d515fc5108d6e9901.zip
We should check whether the surface handle is NULL or NOT. Change-Id: Idca2b162a2e08a68f913118206f655f6336555b7 Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r--screen_connector_watcher/src/screen_connector_watcher.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/screen_connector_watcher/src/screen_connector_watcher.c b/screen_connector_watcher/src/screen_connector_watcher.c
index ad29f4e..1328adf 100644
--- a/screen_connector_watcher/src/screen_connector_watcher.c
+++ b/screen_connector_watcher/src/screen_connector_watcher.c
@@ -250,10 +250,12 @@ static void __destroy_watcher_h(screen_connector_watcher_h handle)
if (!handle)
return;
- tizen_remote_surface_set_user_data(handle->surface, NULL);
- tizen_remote_surface_unredirect(handle->surface);
- tizen_remote_surface_destroy(handle->surface);
- handle->surface = NULL;
+ if (handle->surface) {
+ tizen_remote_surface_set_user_data(handle->surface, NULL);
+ tizen_remote_surface_unredirect(handle->surface);
+ tizen_remote_surface_destroy(handle->surface);
+ handle->surface = NULL;
+ }
if (handle->appid) {
free(handle->appid);