Remove handle from watcher list when watcher destroyed 24/117924/1 accepted/tizen/3.0/common/20170316.121716 accepted/tizen/3.0/ivi/20170316.083343 accepted/tizen/3.0/mobile/20170316.083306 accepted/tizen/3.0/tv/20170316.083324 accepted/tizen/3.0/wearable/20170316.083332 submit/tizen_3.0/20170308.052548 submit/tizen_3.0/20170316.021307
authorHyunho Kang <hhstark.kang@samsung.com>
Thu, 2 Mar 2017 12:28:24 +0000 (21:28 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Wed, 8 Mar 2017 05:00:38 +0000 (21:00 -0800)
If viewer try to remove handle without removing evas object,
handle remain in watcher list.

Change-Id: I88f04d69ad56aa6b380e430d94b733c86d07f2f2
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
(cherry picked from commit de30a1b347eeb91c75de828647f65f6b7b89bd45)

screen_connector_watcher/src/screen_connector_watcher.c

index 1328adf..5e1aa33 100644 (file)
@@ -257,6 +257,12 @@ static void __destroy_watcher_h(screen_connector_watcher_h handle)
                handle->surface = NULL;
        }
 
+       if (__pending_watcher_list)
+               __pending_watcher_list = g_list_remove(__pending_watcher_list, handle);
+
+       if (__watcher_list)
+               __watcher_list = g_list_remove(__watcher_list, handle);
+
        if (handle->appid) {
                free(handle->appid);
                handle->appid = NULL;