diff options
author | Filippos Karapetis | 2009-06-01 15:34:33 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-06-01 15:34:33 +0000 |
commit | c85134bd5eb446116e3574fee51a59ff066eddf6 (patch) | |
tree | 964ec7f0a62a9cc45c4066fd3e6eacb43abb92c4 /engines | |
parent | 99c687463030254c5489cd3d47d876970ab7c080 (diff) | |
download | scummvm-rg350-c85134bd5eb446116e3574fee51a59ff066eddf6.tar.gz scummvm-rg350-c85134bd5eb446116e3574fee51a59ff066eddf6.tar.bz2 scummvm-rg350-c85134bd5eb446116e3574fee51a59ff066eddf6.zip |
Some fixes for saving/loading (still broken)
svn-id: r41102
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/game.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/savegame.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index 192aa66367..c9445e44d1 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -424,7 +424,9 @@ void script_free_engine(EngineState *s) { s->_kfuncTable.clear(); delete s->_vocabulary; + s->_vocabulary = 0; delete s->_kernel; + s->_kernel = 0; } void script_free_breakpoints(EngineState *s) { diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 704051d627..6be00653a5 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -780,6 +780,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { retval->animation_delay = s->animation_delay; retval->animation_granularity = s->animation_granularity; retval->gfx_state = s->gfx_state; + retval->old_screen = 0; retval->resmgr = s->resmgr; @@ -832,8 +833,8 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { retval->parser_base = make_reg(s->sys_strings_segment, SYS_STRING_PARSER_BASE); // static VM/Kernel information: - retval->_kernel = s->_kernel; assert(0 == retval->_kernel); + retval->_kernel = s->_kernel; // s->_kernel = 0; // FIXME: We should set s->_kernel to 0 here, // else it could be freed when the old EngineState is freed. Luckily, this freeing currently // never happens, so we don't need to. |