harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp
changeset 40 910a23996aa0
parent 28 c461c7fa72c2
child 43 c5e73110f733
--- a/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp	Wed Jul 14 07:57:22 2010 +0300
+++ b/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp	Fri Jul 23 10:03:59 2010 +0300
@@ -25,6 +25,7 @@
 #include <caf/caf.h>
 #include <pathinfo.h>
 
+#include "harvestercommon.h"
 #include "harvesteraudioplugin.h"
 #include "harvesteraudiopluginutils.h"
 #include "mdsutils.h"
@@ -118,11 +119,16 @@
 	WRITELOG( "CHarvesterAudioPlugin::~CHarvesterAudioPlugin()" );
 	
 	delete iAudioParser;
+	iAudioParser = NULL;
 	delete iPropDefs;
+	iPropDefs = NULL;
 	delete iTNM;
+	iTNM = NULL;
 	
 	delete iPhoneSoundsPath;
+	iPhoneSoundsPath = NULL;
 	delete iMmcSoundsPath;
+	iMmcSoundsPath = NULL;
 	}
 
 // ---------------------------------------------------------------------------
@@ -145,6 +151,7 @@
         TRAP_IGNORE( iTNM = CThumbnailManager::NewL( *this ) );
         }
     
+    SetPriority( KHarvesterPriorityHarvestingPlugin - 2 );
 	
     TFileName sounds = PathInfo::SoundsPath();
     
@@ -534,6 +541,7 @@
         CleanupStack::Pop(); // jpegBuf
         iTNM->CreateThumbnails( *tnmSource );
         delete tnmSource;
+        tnmSource = NULL;
         TBool thumbnailPresent( ETrue );
         CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, 
                           *iPropDefs->iThumbnailPropertyDef, &thumbnailPresent, aIsAdd );