[Scummvm-cvs-logs] SF.net SVN: scummvm: [21614] scummvm/trunk/base/main.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Tue Apr 4 16:31:05 CEST 2006
Revision: 21614
Author: sev
Date: 2006-04-04 16:30:41 -0700 (Tue, 04 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21614&view=rev
Log Message:
-----------
Fix crash for a case when game path is set incorrectly
Modified Paths:
--------------
scummvm/trunk/base/main.cpp
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp 2006-04-04 23:29:24 UTC (rev 21613)
+++ scummvm/trunk/base/main.cpp 2006-04-04 23:30:41 UTC (rev 21614)
@@ -244,7 +244,10 @@
static int runGame(GameDetector &detector, OSystem &system, const Common::String &edebuglevels) {
// We add it here, so MD5-based detection will be able to
// read mixed case files
- Common::File::addDefaultDirectory(ConfMan.get("path"));
+ if (ConfMan.hasKey("path"))
+ Common::File::addDefaultDirectory(ConfMan.get("path"));
+ else
+ Common::File::addDefaultDirectory(".");
// Create the game engine
Engine *engine = detector.createEngine(&system);
@@ -271,7 +274,10 @@
system.setWindowCaption(caption.c_str());
}
- Common::File::addDefaultDirectoryRecursive(ConfMan.get("path"));
+ if (ConfMan.hasKey("path"))
+ Common::File::addDefaultDirectoryRecursive(ConfMan.get("path"));
+ else
+ Common::File::addDefaultDirectoryRecursive(".");
// Add extrapath (if any) to the directory search list
if (ConfMan.hasKey("extrapath"))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list