WebView* current = view_stack_.front();
if (current == view) {
+ // In order to prevent the crash issue due to the callback
+ // which occur after destroying WebApplication class,
+ // we have to set the 'SetEventListener' to NULL.
+ view->SetEventListener(NULL);
view_stack_.pop_front();
} else {
auto found = std::find(view_stack_.begin(), view_stack_.end(), view);
if (found != view_stack_.end()) {
+ // In order to prevent the crash issue due to the callback
+ // which occur after destroying WebApplication class,
+ // we have to set the 'SetEventListener' to NULL.
+ view->SetEventListener(NULL);
view_stack_.erase(found);
}
}
softkeyboard_value.width = self->ime_width_;
softkeyboard_value.height = self->ime_height_;
- self->listener_->OnSoftKeyboardChangeEvent(self->view_, softkeyboard_value);
+ if (self->listener_)
+ self->listener_->OnSoftKeyboardChangeEvent(self->view_, softkeyboard_value);
};
auto ime_closed_callback = [](void* user_data,
SoftKeyboardChangeEventValue softkeyboard_value;
softkeyboard_value.state = "off";
- self->listener_->OnSoftKeyboardChangeEvent(self->view_, softkeyboard_value);
+ if (self->listener_)
+ self->listener_->OnSoftKeyboardChangeEvent(self->view_, softkeyboard_value);
};
evas_object_smart_callback_add(ewk_view_,
"inputmethod,changed",