[Scummvm-cvs-logs] SF.net SVN: scummvm:[54804] scummvm/trunk/engines/hugo
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Tue Dec 7 00:15:25 CET 2010
Revision: 54804
http://scummvm.svn.sourceforge.net/scummvm/?rev=54804&view=rev
Author: tdhs
Date: 2010-12-06 23:15:25 +0000 (Mon, 06 Dec 2010)
Log Message:
-----------
HUGO: Fixed Valgrind Errors and Segfault when hugo.dat is missing.
Modified Paths:
--------------
scummvm/trunk/engines/hugo/hugo.cpp
scummvm/trunk/engines/hugo/object.cpp
Modified: scummvm/trunk/engines/hugo/hugo.cpp
===================================================================
--- scummvm/trunk/engines/hugo/hugo.cpp 2010-12-06 21:10:12 UTC (rev 54803)
+++ scummvm/trunk/engines/hugo/hugo.cpp 2010-12-06 23:15:25 UTC (rev 54804)
@@ -65,7 +65,7 @@
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)
Modified: scummvm/trunk/engines/hugo/object.cpp
===================================================================
--- scummvm/trunk/engines/hugo/object.cpp 2010-12-06 21:10:12 UTC (rev 54803)
+++ scummvm/trunk/engines/hugo/object.cpp 2010-12-06 23:15:25 UTC (rev 54804)
@@ -48,6 +48,7 @@
ObjectHandler::ObjectHandler(HugoEngine *vm) : _vm(vm), _objects(0) {
_numObj = 0;
+ _objCount = 0;
}
ObjectHandler::~ObjectHandler() {
@@ -211,7 +212,7 @@
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
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