Fixed the crash when the app is terminated
authorJongHeon Choi <j-h.choi@samsung.com>
Wed, 16 Mar 2016 04:24:02 +0000 (13:24 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Wed, 16 Mar 2016 04:24:02 +0000 (13:24 +0900)
runtime/browser/web_application.cc

index cae57b1..e9b211d 100755 (executable)
@@ -227,6 +227,13 @@ WebApplication::WebApplication(
 
 WebApplication::~WebApplication() {
   if (ewk_context_) ewk_context_delete(ewk_context_);
+
+  window_->SetContent(NULL);
+  auto it = view_stack_.begin();
+  for (; it != view_stack_.end(); ++it) {
+    delete *it;
+  }
+  view_stack_.clear();
 }
 
 bool WebApplication::Initialize() {