prevent issues fixed
authorDivya Darshini <d.darshini@samsung.com>
Mon, 15 Apr 2013 11:56:19 +0000 (17:26 +0530)
committerDivya Darshini <d.darshini@samsung.com>
Mon, 15 Apr 2013 11:56:19 +0000 (17:26 +0530)
Change-Id: I9f4e34da23c87c7aab97bdf443d7e288e298f240

src/MmDrawingDetailForm.cpp
src/MmListEditorForm.cpp
src/MmListForm.cpp

index babb818..f9ecd43 100644 (file)
@@ -140,8 +140,11 @@ MemoDrawingDetailForm::OnInitializing(void)
                color.SetAlpha(0);
                __pDrawingPanel->SetBackgroundColor(color);
                SetControlAlwaysAtBottom(*__pDrawingPanel, true);
-               int panelHeight = GetClientAreaBounds().height - __pCommentPanel->GetBounds().height - __pDatetimePanel->GetBounds().height;
-               __pDrawingPanel->SetSize(GetClientAreaBounds().width, panelHeight);
+               if (__pCommentPanel != null)
+               {
+                       int panelHeight = GetClientAreaBounds().height - __pCommentPanel->GetBounds().height - __pDatetimePanel->GetBounds().height;
+                       __pDrawingPanel->SetSize(GetClientAreaBounds().width, panelHeight);
+               }
        }
 
        __pCanvas = new (std::nothrow) Canvas();
index b07d7e1..63b17aa 100644 (file)
@@ -116,7 +116,10 @@ MemoListEditorForm::OnInitializing(void)
        if (__pSelectedPopUpPanel != null)
        {
                __pSelectedPopUpPanel->SetBackgroundColor(panelColor);
-               __pSelectedPopUpPanel->SetPosition(GetClientAreaBounds().x, __pFormFooter->GetBounds().y - __pSelectedPopUpPanel->GetHeight());
+               if (__pFormFooter != null)
+               {
+                       __pSelectedPopUpPanel->SetPosition(GetClientAreaBounds().x, __pFormFooter->GetBounds().y - __pSelectedPopUpPanel->GetHeight());
+               }
        }
 
        __pSelectedPopUpLabel = static_cast<Label*>(GetControl("IDC_LABEL_SELECTED_POPUP", true));
index 16937e4..5d6ba15 100644 (file)
@@ -438,14 +438,17 @@ MemoListForm::OnSearchBarModeChanged(SearchBar& source, SearchBarMode mode)
                if(__pMemoListView != null)
                {
                        pLayout->SetRelation(*__pMemoListView, __pSearchBar, RECT_EDGE_RELATION_TOP_TO_BOTTOM);
+                       __pMemoListView->ScrollToItem(0);
+                       __pMemoListView->SetEnabled(false);
                }
                __isSearchRegistered = true;
                __pFormFooter->SetShowState(false);
-               __pMemoListView->ScrollToItem(0);
-               __pMemoListView->SetEnabled(false);
                __pSearchBar->ShowKeypad();
        }
-       __pMemoListView->Invalidate(false);
+       if(__pMemoListView != null)
+       {
+               __pMemoListView->Invalidate(false);
+       }
        __pFormFooter->Draw();
        return;
 }