QTfrontend/hwform.cpp
changeset 6167 728cabee2c9f
parent 6166 701c5b8fac56
child 6180 0992fc5a4ad9
--- a/QTfrontend/hwform.cpp	Fri Oct 21 08:03:42 2011 +0200
+++ b/QTfrontend/hwform.cpp	Fri Oct 21 08:41:21 2011 +0200
@@ -99,13 +99,9 @@
   : QMainWindow(parent), pnetserver(0), pRegisterServer(0), editedTeam(0), hwnet(0)
 {
     // set music track
-    QFile * tmpFile =
-            HWDataManager::instance().findFileForRead("Music/main_theme.ogg");
-
-    SDLInteraction::instance().setMusicTrack(tmpFile->fileName());
-
-    // this QFile isn't needed any further
-    delete tmpFile;
+    SDLInteraction::instance().setMusicTrack(
+        HWDataManager::instance().findFileForRead("Music/main_theme.ogg")
+    );
 
 #ifdef USE_XFIRE
     xfire_init();