summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 7c3c0a2ca..b5cad0661 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -50,6 +50,7 @@
#include "utils/base64.h"
#include "utils/delete2.h"
+#include "utils/physfstools.h"
#include "utils/stringmap.h"
#include <zlib.h>
@@ -1209,5 +1210,6 @@ void MapReader::updateMusic(Map *const map)
if (p != std::string::npos)
name = name.substr(0, p);
name.append(".ogg");
- map->setProperty("music", name);
+ if (PhysFs::exists(paths.getStringValue("music").append(name).c_str()))
+ map->setProperty("music", name);
}