diff options
author | Filippos Karapetis | 2010-12-24 14:56:04 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-12-24 14:56:04 +0000 |
commit | 5e5410f8919800c26e30d3f376489b20494f6393 (patch) | |
tree | 14c02df73608d62e3e781f6c09bc228173f8463e /engines/sci | |
parent | 9af30a25468f1e31432dda3dbcabd43febb1ae23 (diff) | |
download | scummvm-rg350-5e5410f8919800c26e30d3f376489b20494f6393.tar.gz scummvm-rg350-5e5410f8919800c26e30d3f376489b20494f6393.tar.bz2 scummvm-rg350-5e5410f8919800c26e30d3f376489b20494f6393.zip |
SCI: Only sync the synonyms vocabulary if the game actually has one (thanks wjp)
svn-id: r55033
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index c5e3b355fe..fbf0456af9 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -821,7 +821,9 @@ bool gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savenam 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,8 +888,10 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { 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(); |