--- a/harvester/monitorplugins/fileplugin/src/FolderRenamer.cpp Wed Jul 14 07:57:22 2010 +0300
+++ b/harvester/monitorplugins/fileplugin/src/FolderRenamer.cpp Fri Jul 23 10:03:59 2010 +0300
@@ -38,7 +38,9 @@
CRenameItem::~CRenameItem()
{
delete iOldName;
+ iOldName = NULL;
delete iNewName;
+ iNewName = NULL;
iFileEvents.ResetAndDestroy();
}
@@ -63,9 +65,14 @@
{
TMdsFSPStatus* event = NULL;
event = new TMdsFSPStatus(aEvent);
+
if (event)
{
- iFileEvents.Append(event);
+ if(iFileEvents.Append(event) != KErrNone)
+ {
+ delete event;
+ event = NULL;
+ }
}
}
@@ -157,7 +164,10 @@
iRenamedFolders.Remove(0);
TRAP_IGNORE(currItem->HandleFileEventsL(iCFileEventHandlerAO));
delete currItem;
+ currItem = NULL;
+
SetNextRequest(ERenameStateIdle);
+
if (iRenamedFolders.Count() == 0)
{
iIsRunning = EFalse;