diff options
author | Max Horn | 2007-01-21 15:19:30 +0000 |
---|---|---|
committer | Max Horn | 2007-01-21 15:19:30 +0000 |
commit | fef501c20509d7a74f4ee53abd2557be533c75e7 (patch) | |
tree | 28c28da5695bf1432e8f76d3fb029729e3e0f9b6 /engines/cine | |
parent | aaf706a43df127b4134c23313f02177525f86e78 (diff) | |
download | scummvm-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.cpp | 3 |
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; |