diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-14 23:59:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-14 23:59:44 +0300 |
commit | bf235a610f10301471ca83ce153511d63b3fa9f9 (patch) | |
tree | 807def519ff2dd564cdb23a4c05cd9a79338eab2 /src/map.cpp | |
parent | bf9bccc30a186e338f96c230a4f63cc924c77bd8 (diff) | |
download | manaplus-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.cpp | 5 |
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)) |