aboutsummaryrefslogtreecommitdiff
path: root/engines/cine
diff options
context:
space:
mode:
authorMax Horn2007-01-21 15:19:30 +0000
committerMax Horn2007-01-21 15:19:30 +0000
commitfef501c20509d7a74f4ee53abd2557be533c75e7 (patch)
tree28c28da5695bf1432e8f76d3fb029729e3e0f9b6 /engines/cine
parentaaf706a43df127b4134c23313f02177525f86e78 (diff)
downloadscummvm-rg350-fef501c20509d7a74f4ee53abd2557be533c75e7.tar.gz
scummvm-rg350-fef501c20509d7a74f4ee53abd2557be533c75e7.tar.bz2
scummvm-rg350-fef501c20509d7a74f4ee53abd2557be533c75e7.zip
openForSaving can fail, so it should be handled gracefully -- but better to assert out in a controlled manner than o invoke methods on a NULL pointer, right? :-)
svn-id: r25151
Diffstat (limited to 'engines/cine')
-rw-r--r--engines/cine/various.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index d75a2e0f4a..d6805c2ec4 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -1022,6 +1022,9 @@ void CineEngine::makeSystemMenu(void) {
snprintf(tmp, 80, "%s.dir", _targetName.c_str());
fHandle = g_saveFileMan->openForSaving(tmp);
+ // FIXME: Properly handle openForSaving failures instead of
+ // just crashing silently!
+ assert(fHandle);
fHandle->write(currentSaveName, 200);
delete fHandle;