omaprovisioning/provisioning/ProvisioningEngine/Src/CWPBindingContextManager.cpp
changeset 73 ae69c2e8bc34
parent 0 b497e44ab2fc
--- a/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPBindingContextManager.cpp	Tue Sep 28 17:53:08 2010 +0530
+++ b/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPBindingContextManager.cpp	Fri Oct 15 11:46:45 2010 +0530
@@ -163,14 +163,16 @@
     delete colset;
     
     User::LeaveIfError( table.SetIndex( KDbIndexDataContextId ) );
-    table.SeekL( TDbSeekKey( TUint( aUid ) ) );
-    TInt found( 0 );
-    while( table.AtRow() && 
+    TInt found( 0 );	
+    if(table.SeekL( TDbSeekKey( TUint( aUid ) ) ))
+    {    	
+    	while( table.AtRow() && 
         (table.GetL(), table.ColUint32( contextId ) == aUid ) )
         {
         found++;
         table.NextL();
         }
+    }
     FTRACE(RDebug::Print(_L("[Provisioning] CWPBindingContextManager::ContextDataCountL count (%d)"), found));
     CleanupStack::PopAndDestroy(); // table
     return found;