harvester/monitorplugins/mmcplugin/src/mmcscannerao.cpp
branchRCL_3
changeset 19 b73252188534
parent 7 3cebc1a84278
child 20 f23c07ec56e2
--- a/harvester/monitorplugins/mmcplugin/src/mmcscannerao.cpp	Thu Jul 15 19:07:24 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcscannerao.cpp	Thu Aug 19 10:20:41 2010 +0300
@@ -82,6 +82,7 @@
 	// Delete instance variables if any
 	
 	delete iMmcFileList;
+	iMmcFileList = NULL;
 	
 	iEntryArray.ResetAndDestroy();
 	iEntryArray.Close();
@@ -248,6 +249,7 @@
 			hd->SetEventType( EHarvesterEdit );
 			hd->SetObjectType( ENormal );
 			delete ei;
+			ei = NULL;
 			}
 		else
 			{
@@ -255,7 +257,12 @@
 			hd->SetObjectType( EPlaceholder );
 			hd->SetClientData( ei );
 			}
-		iHdArray.Append( hd );
+			
+		if(iHdArray.Append( hd ) != KErrNone )
+		    {
+            delete hd;
+            hd = NULL;
+		    }
         iHarvestEntryArray.Remove( i );
         }