summaryrefslogtreecommitdiff
path: root/src/gui/shopwindow.cpp
diff options
context:
space:
mode:
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))
{