diff -r 6c59112cfd31 -r 38bf5461e270 emailservices/emailstore/message_store/server/src/ContainerStoreContainersTable.cpp --- a/emailservices/emailstore/message_store/server/src/ContainerStoreContainersTable.cpp Thu Sep 30 11:43:07 2010 +0300 +++ b/emailservices/emailstore/message_store/server/src/ContainerStoreContainersTable.cpp Thu Oct 14 17:33:43 2010 +0300 @@ -227,20 +227,20 @@ __LOG_ENTER_SUPPRESS( "FindL" ) __LOG_WRITE_FORMAT1_DEBUG3( "query=%S", &aSqlQuery ) - TContainerId returnValue; - - iTable.FirstL(); + TContainerId returnValue = KContainerInvalidId; - if( iTable.FindL( RDbRowSet::EForwards, aSqlQuery ) == KErrNotFound ) - { - __LOG_WRITE_INFO( "No match found" ) - returnValue = KContainerInvalidId; - } - else - { - iTable.GetL(); - returnValue = iTable.ColUint32( iIdColNum ); - } // end if + if(iTable.FirstL()){ + if( iTable.FindL( RDbRowSet::EForwards, aSqlQuery ) == KErrNotFound ) + { + __LOG_WRITE_INFO( "No match found" ) + returnValue = KContainerInvalidId; + } + else + { + iTable.GetL(); + returnValue = iTable.ColUint32( iIdColNum ); + } // end if + } return returnValue;