Check null bind_window value 72/229972/1
authorhyunho <hhstark.kang@samsung.com>
Tue, 7 Apr 2020 03:42:21 +0000 (12:42 +0900)
committerhyunho <hhstark.kang@samsung.com>
Tue, 7 Apr 2020 03:42:52 +0000 (12:42 +0900)
Change-Id: Ic3e22d0445e7667f4e5045f0684b013c145bc7ce
Signed-off-by: hyunho <hhstark.kang@samsung.com>
watch-holder/src/watch.cc

index d99a87b..9260962 100644 (file)
@@ -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);