contentstorage/srvsrc/castorageproxy.cpp
changeset 99 7aaf39b772ac
parent 98 d2f833ab7940
child 102 8b8b34fa9751
--- a/contentstorage/srvsrc/castorageproxy.cpp	Fri Jun 11 16:13:51 2010 +0300
+++ b/contentstorage/srvsrc/castorageproxy.cpp	Thu Jun 24 16:18:29 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;
 	}