Fixed Nabi Issues 49466,55718,55225,52332
[apps/osp/Internet.git] / src / IntMainForm.cpp
index 1852498..818b5c9 100644 (file)
@@ -3538,7 +3538,8 @@ MainForm::OnFocusGained(const Tizen::Ui::Control& source)
                __pFindWordNext->SetEnabled(false);
                __pFindWordPrev->SetEnabled(false);
 
-               __pWebViewer->SearchTextAllAsync(L"",true);
+               if(__pWebViewer)
+                       __pWebViewer->SearchTextAllAsync(L"",true);
                __pFindWordControl->SetShowState(false);
        }
        RelayoutControls(false);
@@ -4258,7 +4259,8 @@ MainForm::OnWebWindowCloseRequested(Tizen::Web::Controls::Web& source)
                                        return;
                                }
                        }
-                       r = pSceneManager->GoForward(ForwardSceneTransition(pNewWindowInfo->sceneID ,SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY));
+                       if(pNewWindowInfo)
+                               r = pSceneManager->GoForward(ForwardSceneTransition(pNewWindowInfo->sceneID ,SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY));
 
                        break;
                }
@@ -4497,7 +4499,8 @@ void MainForm::OnTextFound(int totalCount, int currentOrdinal)
        {
                AppLog("Word not found");
                //Show error notification to user
-               __pFindWordNext->SetEnabled(false);
+               if(__pFindWordNext)
+                       __pFindWordNext->SetEnabled(false);
                if(__pFindWordCountLabel && __pFindWordCountLabel->GetShowState() == true)
                {
                        __pFindWordCountLabel->SetText(L"0/0");
@@ -4508,7 +4511,8 @@ void MainForm::OnTextFound(int totalCount, int currentOrdinal)
                        __pFindWordCountLabelRightToLeft->SetText(L"0/0");
                        __pFindWordCountLabelRightToLeft->Invalidate(false);
                }
-               __pFindWordNext->Invalidate(false);
+               if(__pFindWordNext)
+                       __pFindWordNext->Invalidate(false);
                __pFindWordPrev->Invalidate(false);
 
                return;
@@ -4516,11 +4520,13 @@ void MainForm::OnTextFound(int totalCount, int currentOrdinal)
 
        if (totalCount == 1 || totalCount == currentOrdinal)
        {
-               __pFindWordNext->SetEnabled(false);
+               if(__pFindWordNext)
+                       __pFindWordNext->SetEnabled(false);
        }
        else
        {
-               __pFindWordNext->SetEnabled(true);
+               if(__pFindWordNext)
+                       __pFindWordNext->SetEnabled(true);
        }
 
        String countStr = L"";