Add nullptr check of EcoreHandler
[platform/core/appfw/app-core.git] / tizen-cpp / app-core-multi-window-cpp / app_core_multi_window_base.cc
index 6f3e89c..86261da 100644 (file)
@@ -219,9 +219,12 @@ void AppCoreMultiWindowBase::Dispose() {
   }
   impl_->contexts_.clear();
   impl_->factory_map_.clear();
-  impl_->handler_->UnsetEvents();
+
   AppCoreBase::Dispose();
-  impl_->handler_->Fini();
+  if (impl_->handler_.get() != nullptr) {
+    impl_->handler_->UnsetEvents();
+    impl_->handler_->Fini();
+  }
 }
 
 int AppCoreMultiWindowBase::OnCreate() {