[Scummvm-cvs-logs] SF.net SVN: scummvm:[38383] scummvm/trunk/engines/kyra
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Mon Feb 16 22:46:02 CET 2009
Revision: 38383
http://scummvm.svn.sourceforge.net/scummvm/?rev=38383&view=rev
Author: athrxx
Date: 2009-02-16 21:46:02 +0000 (Mon, 16 Feb 2009)
Log Message:
-----------
LOL: fixed invalid memory access
Modified Paths:
--------------
scummvm/trunk/engines/kyra/lol.cpp
scummvm/trunk/engines/kyra/lol.h
Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp 2009-02-16 21:19:02 UTC (rev 38382)
+++ scummvm/trunk/engines/kyra/lol.cpp 2009-02-16 21:46:02 UTC (rev 38383)
@@ -138,6 +138,7 @@
memset (_doorShapes, 0, 2 * sizeof(uint8*));
_lampOilStatus = _brightness = _lampStatusUnk = 0;
+ _lampStatusSuspended = false;
_tempBuffer5120 = 0;
_tmpData136 = 0;
_cLevelItems = 0;
@@ -189,20 +190,24 @@
LoLEngine::~LoLEngine() {
setupPrologueData(false);
+ gui_resetButtonList();
delete[] _landsFile;
delete[] _levelLangFile;
delete _screen;
+ _screen = 0;
delete _gui;
+ _gui = 0;
delete _tim;
- delete _txt;
+ _tim = 0;
+ delete _txt;
+ _txt = 0;
- delete[] _itemsInPlay;
- delete[] _itemProperties;
+ delete[] _itemsInPlay;
+ delete[] _itemProperties;
+ delete[] _characters;
- delete[] _characters;
-
if (_itemIconShapes) {
for (int i = 0; i < _numItemIconShapes; i++)
delete[] _itemIconShapes[i];
@@ -302,8 +307,6 @@
delete[] _ingameSoundList[i];
delete[] _ingameSoundList;
}
-
- gui_resetButtonList();
}
Screen *LoLEngine::screen() {
Modified: scummvm/trunk/engines/kyra/lol.h
===================================================================
--- scummvm/trunk/engines/kyra/lol.h 2009-02-16 21:19:02 UTC (rev 38382)
+++ scummvm/trunk/engines/kyra/lol.h 2009-02-16 21:46:02 UTC (rev 38383)
@@ -397,7 +397,7 @@
void gui_initMagicScrollButtons();
void gui_initMagicSubmenu(int charNum);
void gui_initButton(int index, int x = -1);
- void gui_notifyButtonListChanged() { _gui->_buttonListChanged = true; }
+ void gui_notifyButtonListChanged() { if (_gui) _gui->_buttonListChanged = true; }
void assignButtonCallback(Button *button, int index);
Button *_activeButtons;
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