idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp
branchRCL_3
changeset 31 8baec10861af
parent 30 a5a39a295112
--- a/idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp	Wed Sep 01 12:22:09 2010 +0100
+++ b/idlefw/plugins/wrtdataplugin/src/wrtdataplugin.cpp	Tue Sep 14 21:55:16 2010 +0300
@@ -582,7 +582,9 @@
           if ( icon != NULL ) // Syntax correct but icon not found
               {
               aObserver->PublishPtr( *this, aContentId, icon , aContentId );
-              iIconArray.Append(icon);
+              CleanupStack::PushL( icon );
+              iIconArray.AppendL( icon );
+              CleanupStack::Pop( icon );
               } 
           else
               {
@@ -626,6 +628,7 @@
                 {
                 // Take the ownership
                 CGulIcon* icon = CGulIcon::NewL(bitmap);
+                CleanupStack::PushL( icon );
                 if( aMaskHandle != KErrBadHandle )
                     {
                     CFbsBitmap* mask = new (ELeave) CFbsBitmap();
@@ -635,7 +638,8 @@
                         }
                     }
                 aObserver->PublishPtr( *this, aContentId, icon , aContentId );
-                iIconArray.Append(icon);
+                iIconArray.AppendL( icon );
+                CleanupStack::Pop( icon );
                 }
             else
                 {