From 8f2f74e6de5f88bed33d9a73e12d07ca729bd6c7 Mon Sep 17 00:00:00 2001 From: Gwangbok Kim Date: Tue, 29 Oct 2013 18:10:03 +0900 Subject: [PATCH] fix TC failure Change-Id: I704722ac0573121c47d82742061df10a793d84cb Signed-off-by: Gwangbok Kim Signed-off-by: hs321.lee --- src/FScl_AddressbookManagerImpl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/FScl_AddressbookManagerImpl.cpp b/src/FScl_AddressbookManagerImpl.cpp index 314b125..474ba46 100644 --- a/src/FScl_AddressbookManagerImpl.cpp +++ b/src/FScl_AddressbookManagerImpl.cpp @@ -1450,9 +1450,12 @@ _AddressbookManagerImpl::GetPersonsByCategoryN(RecordId categoryId) const ClearLastResult(); - unique_ptr pCategoryRecord(_AddressbookUtil::GetContactRecordN(_contacts_group._uri, categoryId)); - SysTryReturn(NID_SCL, GetLastResult() != E_OBJ_NOT_FOUND, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); - SysTryReturn(NID_SCL, GetLastResult() == E_SUCCESS, null, E_SYSTEM, "[%s] An system error has been occurred.", GetErrorMessage(E_SYSTEM)); + if (categoryId > INVALID_RECORD_ID) + { + unique_ptr pCategoryRecord(_AddressbookUtil::GetContactRecordN(_contacts_group._uri, categoryId)); + SysTryReturn(NID_SCL, GetLastResult() != E_OBJ_NOT_FOUND, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + SysTryReturn(NID_SCL, GetLastResult() == E_SUCCESS, null, E_SYSTEM, "[%s] An system error has been occurred.", GetErrorMessage(E_SYSTEM)); + } IList* pPersons = null; -- 2.7.4