From: hyunho Date: Tue, 20 Oct 2020 08:34:36 +0000 (+0900) Subject: Remove bind callback when Unbind called X-Git-Tag: submit/tizen_5.5/20201022.024951~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f5b68ab6e0256b80f5f524f879e2805b971d592;p=platform%2Fcore%2Fappfw%2Fwidget-viewer.git Remove bind callback when Unbind called Change-Id: I2b22cc423269c9813d88a66ba1b27b3d82eb01d9 Signed-off-by: hyunho --- diff --git a/watch-holder/src/watch.cc b/watch-holder/src/watch.cc index 13212b2b..4cfbb9d7 100644 --- a/watch-holder/src/watch.cc +++ b/watch-holder/src/watch.cc @@ -79,7 +79,7 @@ void Watch::BlockUpdate(bool enable) { void Watch::OnAuxMsg(void *data, Evas_Object *o, void *ev_info) { Watch* wa = (Watch*)data; - if (wa->bind_win_ == nullptr) { + if (wa == nullptr || wa->bind_win_ == nullptr) { LOGW("Null bind win"); return; } @@ -137,6 +137,10 @@ void Watch::Bind(Evas_Object* win) { void Watch::Unbind() { RemoteSurfaceEvas::Unbind(); is_bound_ = false; + if (bind_win_ == nullptr) + return; + LOGW("Remove unbind callback"); + evas_object_smart_callback_del(bind_win_, "aux,msg,received", OnAuxMsg); } Evas_Object* Watch::GetCurrentImage() const {