[Scummvm-cvs-logs] SF.net SVN: scummvm:[55033] scummvm/trunk/engines/sci/engine/savegame.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Dec 24 15:56:04 CET 2010


Revision: 55033
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55033&view=rev
Author:   thebluegr
Date:     2010-12-24 14:56:04 +0000 (Fri, 24 Dec 2010)

Log Message:
-----------
SCI: Only sync the synonyms vocabulary if the game actually has one (thanks wjp)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/savegame.cpp

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-12-24 14:47:47 UTC (rev 55032)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-12-24 14:56:04 UTC (rev 55033)
@@ -821,7 +821,9 @@
 	s->saveLoadWithSerializer(ser);		// FIXME: Error handling?
 	if (g_sci->_gfxPorts)
 		g_sci->_gfxPorts->saveLoadWithSerializer(ser);
-	g_sci->getVocabulary()->saveLoadWithSerializer(ser);
+	Vocabulary *voc = g_sci->getVocabulary();
+	if (voc)
+		voc->saveLoadWithSerializer(ser);
 
 	return true;
 }
@@ -886,9 +888,11 @@
 
 	if (g_sci->_gfxPorts)
 		g_sci->_gfxPorts->saveLoadWithSerializer(ser);
-	if (ser.getVersion() >= 30)
-		g_sci->getVocabulary()->saveLoadWithSerializer(ser);
 
+	Vocabulary *voc = g_sci->getVocabulary();
+	if (ser.getVersion() >= 30 && voc)
+		voc->saveLoadWithSerializer(ser);
+
 	g_sci->_soundCmd->reconstructPlayList();
 
 	// Message state:


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