From: Seongjun Yim Date: Mon, 26 Aug 2013 10:05:07 +0000 (+0900) Subject: fix crash issue X-Git-Tag: submit/tizen_2.2/20131107.062229~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d611540452116d549277cb81ef35f963a7be3bf9;p=framework%2Fosp%2Fweb.git fix crash issue Change-Id: I331f91f4ed05bfabd2429fb835b648b00e2ec638 Signed-off-by: Seongjun Yim --- diff --git a/src/controls/FWebCtrl_WebImpl.cpp b/src/controls/FWebCtrl_WebImpl.cpp index 857dbdb..c8671de 100755 --- a/src/controls/FWebCtrl_WebImpl.cpp +++ b/src/controls/FWebCtrl_WebImpl.cpp @@ -4751,8 +4751,14 @@ _WebImpl::GetParentFormImpl(_ControlImpl* pControlImpl) bool _WebImpl::OnFocusGained(const _ControlImpl& source) { - Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode()); - SysAssertf(pSettings, "Failed to get webkit instance."); + Evas_Object* pWebview = __pWebCore->GetWebNativeNode(); + if (!pWebview) + { + return false; + } + + Ewk_Settings* pSettings = ewk_view_settings_get(pWebview); + SysAssertf(pSettings, "Failed to get settings instance."); ewk_settings_clear_text_selection_automatically_set(pSettings, true); return false; @@ -4762,18 +4768,23 @@ _WebImpl::OnFocusGained(const _ControlImpl& source) bool _WebImpl::OnFocusLost(const _ControlImpl& source) { + Evas_Object* pWebview = __pWebCore->GetWebNativeNode(); + if (!pWebview) + { + return false; + } + if(IsKeypadVisible() == true) { SetKeypadOpened(true); - SetKeypadVisibleState(false); } - Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode()); - SysAssertf(pSettings, "Failed to get webkit instance."); + Ewk_Settings* pSettings = ewk_view_settings_get(pWebview); + SysAssertf(pSettings, "Failed to get settings instance."); ewk_settings_clear_text_selection_automatically_set(pSettings, false); - evas_object_focus_set(__pWebCore->GetWebNativeNode(), EINA_FALSE); + evas_object_focus_set(pWebview, EINA_FALSE); return false; }