summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-14 23:59:44 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-14 23:59:44 +0300
commitbf235a610f10301471ca83ce153511d63b3fa9f9 (patch)
tree807def519ff2dd564cdb23a4c05cd9a79338eab2 /src/map.cpp
parentbf9bccc30a186e338f96c230a4f63cc924c77bd8 (diff)
downloadmanaplus-bf235a610f10301471ca83ce153511d63b3fa9f9.tar.gz
manaplus-bf235a610f10301471ca83ce153511d63b3fa9f9.tar.bz2
manaplus-bf235a610f10301471ca83ce153511d63b3fa9f9.tar.xz
manaplus-bf235a610f10301471ca83ce153511d63b3fa9f9.zip
Add missing checks.
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))