We should check whether the surface handle is NULL or NOT.
Change-Id: Idca2b162a2e08a68f913118206f655f6336555b7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
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);