imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagaudioobserver.cpp
branchRCL_3
changeset 20 2b4b06654caa
parent 19 f759b6186ab5
child 21 6257223ede8a
--- a/imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagaudioobserver.cpp	Thu Jul 15 18:59:26 2010 +0300
+++ b/imagehandlingutilities/thumbnailmanager/thumbagdaemon/src/thumbagaudioobserver.cpp	Thu Aug 19 10:13:51 2010 +0300
@@ -308,18 +308,20 @@
     
     // set observing conditions
     CMdELogicCondition* addCondition = CMdELogicCondition::NewLC( ELogicConditionOperatorAnd );
-    addCondition->AddObjectConditionL( audioDef );
-    CleanupStack::Pop( addCondition );  
+    CMdEObjectCondition& addObjectCondition = addCondition->AddObjectConditionL( audioDef );
+    CleanupStack::PushL( &addObjectCondition );
     
     CMdELogicCondition* modifyCondition = CMdELogicCondition::NewLC( ELogicConditionOperatorAnd );
-    modifyCondition->AddObjectConditionL( audioDef );
-    CleanupStack::Pop( modifyCondition );
+    CMdEObjectCondition& modifyObjectCondition = modifyCondition->AddObjectConditionL( audioDef );
+    CleanupStack::PushL( &modifyObjectCondition );
     
     // add observer
     iMdESession->AddObjectObserverL( *this, addCondition, ENotifyAdd ); 
 
    // modify observer
    iMdESession->AddObjectObserverL( *this, modifyCondition, ENotifyModify );
+   
+   CleanupStack::Pop( 4, addCondition );
      
     TN_DEBUG1( "CThumbAGAudioObserver::AddObserversL() - end" );
     }