[Scummvm-cvs-logs] scummvm master -> db24f1e068c2d4bcf6784a67f3caff0e72e9f5d2
spookypeanut
github at spookypeanut.co.uk
Mon Apr 25 09:52:45 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
db24f1e068 GROOVIE: fix for bug #3093310
Commit: db24f1e068c2d4bcf6784a67f3caff0e72e9f5d2
https://github.com/scummvm/scummvm/commit/db24f1e068c2d4bcf6784a67f3caff0e72e9f5d2
Author: spookypeanut (github at spookypeanut.co.uk)
Date: 2011-04-25T00:51:21-07:00
Commit Message:
GROOVIE: fix for bug #3093310
Instead of crashing if the save game isn't writable, popup a
gui message and then skip
Changed paths:
engines/groovie/script.cpp
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 9b58f8b..8c7d3b0 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -39,6 +39,8 @@
#include "common/EventRecorder.h"
#include "common/macresman.h"
+#include "gui/message.h"
+
#define NUM_OPCODES 90
namespace Groovie {
@@ -411,6 +413,13 @@ void Script::savegame(uint slot) {
char newchar;
Common::OutSaveFile *file = SaveLoad::openForSaving(ConfMan.getActiveDomainName(), slot);
+ if (!file) {
+ debugC(9, kGroovieDebugScript, "Save file pointer is null");
+ GUI::MessageDialog dialog("Failed to save game", "OK");
+ dialog.runModal();
+ return;
+ }
+
// Saving the variables. It is endian safe because they're byte variables
file->write(_variables, 0x400);
delete file;
More information about the Scummvm-git-logs
mailing list