Fixed Nabi Issues
[apps/osp/Internet.git] / src / IntMainForm.cpp
index 11bd171..7647607 100644 (file)
@@ -1166,10 +1166,17 @@ MainForm::GetItemCount (void)
 void
 MainForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
 {
-       History* pHistory = static_cast < History* >(__pMostVisitedSites->GetAt(index));
-       String url = pHistory->GetHistoryUrl();
-       HistoryPresentationModel::GetInstance()->DeleteHistory(url);
-       __pMostVisitedListView->UpdateList();
+       if(__pMostVisitedSites != null)
+       {
+               History* pHistory = static_cast < History* >(__pMostVisitedSites->GetAt(index));
+               if (pHistory != null)
+               {
+                       String url = pHistory->GetHistoryUrl();
+
+                       HistoryPresentationModel::GetInstance()->DeleteHistory(url);
+                       __pMostVisitedListView->UpdateList();
+               }
+       }
 }
 
 void
@@ -3901,6 +3908,13 @@ MainForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen::Ui::Ori
 {
        AppLog("MainForm::OnOrientationChanged GetClientAreaBounds %d, %d",GetClientAreaBounds().width,GetClientAreaBounds().height);
        int widthContextItem = 0;
+
+       if(__pWebViewer != null)
+       {
+               // this is added because if any text is selected on long press followed by on rotation we are hiding the context menu therefore we should release the text block also
+               __pWebViewer->ReleaseBlock();
+       }
+
        if(__pFindWordControl != null)
                ShowFindWordPanel(__pFindWordControl->GetShowState(), false);
        if ( __pFooterLabel != null)