diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hugo/hugo.cpp | 2 | ||||
-rw-r--r-- | engines/hugo/object.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 629e7e6e7d..c9f7edb32a 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -65,7 +65,7 @@ command_t _line; // Line of user text input HugoEngine::HugoEngine(OSystem *syst, const HugoGameDescription *gd) : Engine(syst), _gameDescription(gd), _mouseX(0), _mouseY(0), _textData(0), _stringtData(0), _screenNames(0), _textEngine(0), _textIntro(0), _textMouse(0), _textParser(0), _textUtil(0), _arrayNouns(0), _arrayVerbs(0), _arrayReqs(0), _hotspots(0), _invent(0), _uses(0), _catchallList(0), _backgroundObjects(0), - _points(0), _cmdList(0), _screenActs(0), _heroImage(0), _defltTunes(0), _introX(0), _introY(0), _maxInvent(0), _numBonuses(0), + _points(0), _cmdList(0), _screenActs(0), _hero(0), _heroImage(0), _defltTunes(0), _introX(0), _introY(0), _maxInvent(0), _numBonuses(0), _numScreens(0), _tunesNbr(0), _soundSilence(0), _soundTest(0), _screenStates(0), _score(0), _maxscore(0), _backgroundObjectsSize(0), _screenActsSize(0), _usesSize(0) diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp index 6597e89cef..550d803bfb 100644 --- a/engines/hugo/object.cpp +++ b/engines/hugo/object.cpp @@ -48,6 +48,7 @@ namespace Hugo { ObjectHandler::ObjectHandler(HugoEngine *vm) : _vm(vm), _objects(0) { _numObj = 0; + _objCount = 0; } ObjectHandler::~ObjectHandler() { @@ -211,7 +212,7 @@ void ObjectHandler::freeObjects() { debugC(1, kDebugObject, "freeObjects"); // Nothing to do if not allocated yet - if (_vm->_hero->seqList[0].seqPtr == 0) + if (_vm->_hero == 0 || _vm->_hero->seqList[0].seqPtr == 0) return; // Free all sequence lists and image data |