fix N_SE-39511
authorGwangbok Kim <gwangbok.kim@samsung.com>
Tue, 28 May 2013 10:37:30 +0000 (19:37 +0900)
committerGwangbok Kim <gwangbok.kim@samsung.com>
Tue, 28 May 2013 11:13:22 +0000 (20:13 +0900)
Change-Id: Iff0a9503b91bc3fafd8cdca6f3fff29cdd77e9ea
Signed-off-by: Gwangbok Kim <gwangbok.kim@samsung.com>
project/src/DetailViewForm.cpp

index f9b4716..d075c5e 100644 (file)
@@ -212,6 +212,21 @@ DetailViewForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId
        {
                case ID_FOOTER_EDIT:
                {
+                       Person* pPerson = __pAddressbookMgr->GetPersonN(__pPerson->GetId());
+                       if (pPerson == null)
+                       {
+                               MessageBox messageBox;
+                               messageBox.Construct(L"Error", "The person doesn't exist.", MSGBOX_STYLE_OK, 0);
+                               int doModal;
+                               messageBox.ShowAndWait(doModal);
+
+                               pSceneManager->GoBackward(BackwardSceneTransition());
+
+                               break;
+                       }
+
+                       delete pPerson;
+
                        ArrayList* pPersonIdList = new (std::nothrow) ArrayList();
                        AppAssert(pPersonIdList);
 
@@ -305,12 +320,12 @@ DetailViewForm::RemovePerson(void)
        if (IsFailed(r))
        {
                MessageBox messageBox;
-               messageBox.Construct(L"Error", "Failed to remove person", MSGBOX_STYLE_OK, 0);
+               messageBox.Construct(L"Error", "Failed to remove the person", MSGBOX_STYLE_OK, 0);
                int doModal;
                messageBox.ShowAndWait(doModal);
        }
 
-       TryReturn(!IsFailed(r), r, "Failed to remove person (%s).", GetErrorMessage(r));
+       TryReturn(!IsFailed(r), r, "Failed to remove the person (%s).", GetErrorMessage(r));
 
        return r;
 }