summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 2c8dc90e2..773e6ecdc 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1296,6 +1296,11 @@ void Map::addExtraLayer()
{
std::ifstream mapFile;
mapFile.open(mapFileName.c_str(), std::ios::in);
+ if (!mapFile.is_open())
+ {
+ mapFile.close();
+ return;
+ }
char line[201];
std::string buf;
while (mapFile.getline(line, 200))