summaryrefslogtreecommitdiff
path: root/src/gui/shopwindow.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/gui/shopwindow.cpp
parentbf9bccc30a186e338f96c230a4f63cc924c77bd8 (diff)
downloadmanaverse-bf235a610f10301471ca83ce153511d63b3fa9f9.tar.gz
manaverse-bf235a610f10301471ca83ce153511d63b3fa9f9.tar.bz2
manaverse-bf235a610f10301471ca83ce153511d63b3fa9f9.tar.xz
manaverse-bf235a610f10301471ca83ce153511d63b3fa9f9.zip
Add missing checks.
Diffstat (limited to 'src/gui/shopwindow.cpp')
-rw-r--r--src/gui/shopwindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index 7578cbf7b..fdfea5d15 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -312,6 +312,11 @@ void ShopWindow::loadList()
if (!stat(shopListName.c_str(), &statbuf) && S_ISREG(statbuf.st_mode))
{
shopFile.open(shopListName.c_str(), std::ios::in);
+ if (!shopFile.is_open())
+ {
+ shopFile.close();
+ return;
+ }
char line[101];
while (shopFile.getline(line, 100))
{