aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/main.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 00e5b8b49f..95457bef32 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -167,10 +167,15 @@ static bool launcherDialog(GameDetector &detector, OSystem &system) {
static int runGame(const Plugin *plugin, OSystem &system, const Common::String &edebuglevels) {
// We add it here, so MD5-based detection will be able to
// read mixed case files
- if (ConfMan.hasKey("path"))
+ if (ConfMan.hasKey("path")) {
+ if (!Common::File::exists(ConfMan.get("path"))) {
+ warning("Game directory does not exist (%s)", ConfMan.get("path").c_str());
+ return 0;
+ }
Common::File::addDefaultDirectory(ConfMan.get("path"));
- else
+ } else {
Common::File::addDefaultDirectory(".");
+ }
// Create the game engine
Engine *engine = plugin->createInstance(&system);