fix N_SE-43922
authorGwangbok Kim <gwangbok.kim@samsung.com>
Sat, 29 Jun 2013 10:41:46 +0000 (19:41 +0900)
committerGwangbok Kim <gwangbok.kim@samsung.com>
Sat, 29 Jun 2013 10:41:46 +0000 (19:41 +0900)
Change-Id: I091cb4674c30f024abcb104919188ed007594b29
Signed-off-by: Gwangbok Kim <gwangbok.kim@samsung.com>
project/src/MainForm.cpp

index dea1e94..600d8f5 100644 (file)
@@ -190,6 +190,27 @@ MainForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, in
                Person* pPerson = static_cast <Person*> (__pPersonList->GetAt(index));
                AppAssert(pPerson);
 
+               Person* pCheckPerson = AddressbookManager::GetInstance()->GetPersonN(pPerson->GetId());
+               if (pCheckPerson == null)
+               {
+                       MessageBox messageBox;
+                       int doModal;
+
+                       if (GetLastResult() == E_USER_NOT_CONSENTED)
+                       {
+                               messageBox.Construct(L"Error", "No permission to use Contact.", MSGBOX_STYLE_OK, 0);
+                               messageBox.ShowAndWait(doModal);
+                       }
+                       else
+                       {
+                               messageBox.Construct(L"Error", "The person doesn't exist.", MSGBOX_STYLE_OK, 0);
+                               messageBox.ShowAndWait(doModal);
+                       }
+
+                       return;
+               }
+               delete pCheckPerson;
+
                ArrayList* pPersonList = new (std::nothrow) ArrayList();
                AppAssert(pPersonList);