contentstorage/srvsrc/castorageproxy.cpp
changeset 104 9b022b1f357c
parent 103 b99b84bcd2d1
child 109 e0aa398e6810
--- a/contentstorage/srvsrc/castorageproxy.cpp	Wed Jun 23 18:33:40 2010 +0300
+++ b/contentstorage/srvsrc/castorageproxy.cpp	Tue Jul 06 14:37:10 2010 +0300
@@ -287,6 +287,8 @@
             iStorage->GetParentsIdsL( id, parentArray );
             for( TInt i = 0; i < iHandlerNotifier.Count(); i++ )
                 {
+                resultArray[0]->SetFlags( 
+                        resultArray[0]->GetFlags() | EUsed );
                 iHandlerNotifier[i]->EntryChanged( resultArray[0],
                         EUpdateChangeType,
                         parentArray );
@@ -444,15 +446,14 @@
 					result->SetAttributeNameL( KLocalizationEnText );
 					result->SetQmFilenameL( qmFile );
 					result->SetRowId( aEntry->GetId() ? 0 : aEntry->GetId() ); // must be added when present
+					CleanupStack::Pop( result );
 					}
 				else 
 					{
-				    if (translatedString)
-						{
-						CleanupStack::PopAndDestroy(translatedString);
-						}
+					CleanupStack::PopAndDestroy(translatedString);
+					CleanupStack::PopAndDestroy(result);
+					result = NULL;
 					}
-				CleanupStack::Pop( result );
 				}
 			}
 		CleanupStack::PopAndDestroy( &title );
@@ -493,16 +494,20 @@
 					result->SetAttributeNameL( KLocalizationEnDescription );
 					result->SetQmFilenameL( qmFile );
 					result->SetRowId( aEntry->GetId() ? 0 : aEntry->GetId() ); // must be added when present
+					CleanupStack::Pop( result );
 					}
 				else 
 					{
 				    CleanupStack::PopAndDestroy( translatedString );
+				    CleanupStack::PopAndDestroy( result );
+				    result = NULL;
 					}
-				CleanupStack::Pop( result );
+				
 				}
 			}
 		CleanupStack::PopAndDestroy( &description );
 		}
+	
 	return result;
 	}