[Scummvm-cvs-logs] SF.net SVN: scummvm: [25151] scummvm/trunk/engines
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Jan 21 16:19:31 CET 2007
Revision: 25151
http://scummvm.svn.sourceforge.net/scummvm/?rev=25151&view=rev
Author: fingolfin
Date: 2007-01-21 07:19:30 -0800 (Sun, 21 Jan 2007)
Log Message:
-----------
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? :-)
Modified Paths:
--------------
scummvm/trunk/engines/cine/various.cpp
scummvm/trunk/engines/parallaction/loadsave.cpp
Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp 2007-01-21 15:17:28 UTC (rev 25150)
+++ scummvm/trunk/engines/cine/various.cpp 2007-01-21 15:19:30 UTC (rev 25151)
@@ -1022,6 +1022,9 @@
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;
Modified: scummvm/trunk/engines/parallaction/loadsave.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/loadsave.cpp 2007-01-21 15:17:28 UTC (rev 25150)
+++ scummvm/trunk/engines/parallaction/loadsave.cpp 2007-01-21 15:19:30 UTC (rev 25151)
@@ -157,6 +157,9 @@
sprintf(path, "game.%d", _di);
Common::OutSaveFile *f = _saveFileMan->openForSaving(path);
+ // FIXME: Properly handle openForSaving failures instead of
+ // just crashing silently!
+ assert(f);
char s[30];
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