diff options
author | yinsimei | 2017-07-11 14:31:45 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-13 18:27:45 +0200 |
commit | 19ff9f419baae348b153c45c2857a7cccb33f725 (patch) | |
tree | 843db1a0e5faaf01b6cf74a0387b4103d864c7b5 /engines/sludge | |
parent | 59ea5e5834d107d98101fb016686f0a4e8f30218 (diff) | |
download | scummvm-rg350-19ff9f419baae348b153c45c2857a7cccb33f725.tar.gz scummvm-rg350-19ff9f419baae348b153c45c2857a7cccb33f725.tar.bz2 scummvm-rg350-19ff9f419baae348b153c45c2857a7cccb33f725.zip |
SLUDGE: correct loadfile existence check
Diffstat (limited to 'engines/sludge')
-rw-r--r-- | engines/sludge/builtin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp index 123841c11f..225c2f1a05 100644 --- a/engines/sludge/builtin.cpp +++ b/engines/sludge/builtin.cpp @@ -20,6 +20,8 @@ * */ +#include "common/savefile.h" + #include "sludge/allfiles.h" #include "sludge/sludger.h" #include "sludge/builtin.h" @@ -356,6 +358,9 @@ builtIn(loadGame) { Common::File fd; if (fd.open(loadNow)) { fd.close(); + Common::InSaveFile *fp = g_system->getSavefileManager()->openForLoading(loadNow); + if (fp) { + delete fp; return BR_KEEP_AND_PAUSE; } delete []loadNow; |