From 47cf1d94cfc1997a71cb9588de6870229ec5604f Mon Sep 17 00:00:00 2001 From: Gwangbok Kim Date: Fri, 21 Jun 2013 16:33:08 +0900 Subject: [PATCH] fix N_SE-42457 Change-Id: I384b91247f1a061af6d9ed5a9e88a8b87fc7f8ef Signed-off-by: Gwangbok Kim --- project/src/MainForm.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/project/src/MainForm.cpp b/project/src/MainForm.cpp index ed0a357..398102f 100644 --- a/project/src/MainForm.cpp +++ b/project/src/MainForm.cpp @@ -192,6 +192,27 @@ MainForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, in Person* pPerson = static_cast (__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); -- 2.7.4