fix N_SE-42457
authorGwangbok Kim <gwangbok.kim@samsung.com>
Fri, 21 Jun 2013 07:33:08 +0000 (16:33 +0900)
committerGwangbok Kim <gwangbok.kim@samsung.com>
Fri, 21 Jun 2013 07:57:00 +0000 (16:57 +0900)
Change-Id: I384b91247f1a061af6d9ed5a9e88a8b87fc7f8ef
Signed-off-by: Gwangbok Kim <gwangbok.kim@samsung.com>
project/src/MainForm.cpp

index ed0a357..398102f 100644 (file)
@@ -192,6 +192,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);