metadataengine/client/src/mdequery.cpp
changeset 21 50bf9db68373
parent 20 6dfc5f825351
child 19 82c0024438c8
--- a/metadataengine/client/src/mdequery.cpp	Fri Mar 19 09:38:01 2010 +0200
+++ b/metadataengine/client/src/mdequery.cpp	Fri Apr 16 15:23:55 2010 +0300
@@ -47,10 +47,8 @@
     // This will destroy the entire conditions tree.
    	delete iConditions;
 
-   	const TInt count = iResults.Count();
-   	
     // Destroy all result items this query instance owns.
-    for(TInt i = 0; i < count; ++i)
+   	for( TInt i = iResults.Count() - 1; i >=0; i-- )
         {
         if(iResults[i].iOwned)
             {
@@ -149,11 +147,9 @@
         User::Leave(KErrNotReady);
         }
     
-    const TInt count = iResults.Count();
-    
 	// clear old results
 	// Destroy all result items this query instance owns.
-    for(TInt i = 0; i < count; ++i)
+    for( TInt i = iResults.Count() - 1; i >=0; i-- )
         {
         if(iResults[i].iOwned)
             {