fix TC failure 83/14283/1
authorGwangbok Kim <gwangbok.kim@samsung.com>
Tue, 29 Oct 2013 09:10:03 +0000 (18:10 +0900)
committerhs321.lee <hs321.lee@samsung.com>
Thu, 2 Jan 2014 01:59:54 +0000 (10:59 +0900)
Change-Id: I704722ac0573121c47d82742061df10a793d84cb
Signed-off-by: Gwangbok Kim <gwangbok.kim@samsung.com>
Signed-off-by: hs321.lee <hs321.lee@samsung.com>
src/FScl_AddressbookManagerImpl.cpp

index 314b125..474ba46 100644 (file)
@@ -1450,9 +1450,12 @@ _AddressbookManagerImpl::GetPersonsByCategoryN(RecordId categoryId) const
 
        ClearLastResult();
 
-       unique_ptr<ContactRecord, ContactRecordDeleter> 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<ContactRecord, ContactRecordDeleter> 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;