From 7ce22b1fde5b9e27d5509a474cd6c5e7026f4512 Mon Sep 17 00:00:00 2001 From: hyunho Date: Tue, 7 Apr 2020 12:42:21 +0900 Subject: [PATCH] Check null bind_window value Change-Id: Ic3e22d0445e7667f4e5045f0684b013c145bc7ce Signed-off-by: hyunho --- watch-holder/src/watch.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/watch-holder/src/watch.cc b/watch-holder/src/watch.cc index d99a87bb..9260962a 100644 --- a/watch-holder/src/watch.cc +++ b/watch-holder/src/watch.cc @@ -79,10 +79,20 @@ 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) { + LOGW("Null bind win"); + return; + } + Elm_Win_Aux_Message *msg = (Elm_Win_Aux_Message *)ev_info; const char *key = elm_win_aux_msg_key_get(wa->bind_win_, msg); const char *val = elm_win_aux_msg_val_get(wa->bind_win_, msg); + if (key == nullptr || val == nullptr) { + LOGW("Null msg data"); + return; + } + if (!strcmp(key, "tz_remote_surface_mng") && !strcmp(val, "prebind")) { wa->is_bound_ = true; wa->listener_->OnBound(*wa); -- 2.34.1