profilesapplication/Profiles/ProfileApp/SettingsViewSrc/CProfilePlayingVolumeSettingPage.cpp
branchRCL_3
changeset 20 ea11b8c1e6a4
parent 19 cd54903d48da
--- a/profilesapplication/Profiles/ProfileApp/SettingsViewSrc/CProfilePlayingVolumeSettingPage.cpp	Wed Sep 01 12:30:29 2010 +0100
+++ b/profilesapplication/Profiles/ProfileApp/SettingsViewSrc/CProfilePlayingVolumeSettingPage.cpp	Tue Sep 14 21:19:36 2010 +0300
@@ -205,6 +205,13 @@
 //
 void CProfilePlayingVolumeSettingPage::CheckRingingToneTypeL()
 	{
+    // If the preview tone is not NULL, delete it.
+    if ( iPreviewTone )
+        {
+        delete iPreviewTone;
+        iPreviewTone = NULL;
+        }
+    
 	// Get default tone from cenrep
 	TFileName defaultTone;
 	CRepository* cenrep = CRepository::NewL( KCRUidProfileEngine );