diff options
author | Robert Göffringmann | 2003-12-20 19:19:42 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-12-20 19:19:42 +0000 |
commit | 1007e8256f0d17a2e797f9ae6028651e06f33ea3 (patch) | |
tree | 5c2862fa10562b4247acd661198b9a7ea8cb14a1 /sword1 | |
parent | be120d1289c199675e8ec9e4a1eb1466d86b62a6 (diff) | |
download | scummvm-rg350-1007e8256f0d17a2e797f9ae6028651e06f33ea3.tar.gz scummvm-rg350-1007e8256f0d17a2e797f9ae6028651e06f33ea3.tar.bz2 scummvm-rg350-1007e8256f0d17a2e797f9ae6028651e06f33ea3.zip |
fix memory leak
svn-id: r11788
Diffstat (limited to 'sword1')
-rw-r--r-- | sword1/control.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sword1/control.cpp b/sword1/control.cpp index 8617c70f8e..56377033ec 100644 --- a/sword1/control.cpp +++ b/sword1/control.cpp @@ -148,7 +148,6 @@ uint8 SwordControl::runPanel(void) { _keyPressed = _numButtons = 0; _screenBuf = (uint8*)malloc(640 * 480); _font = (uint8*)_resMan->openFetchRes(GAME_FONT); // todo: czech support - _resMan->resOpen(SR_BUTTON); uint8 *pal = (uint8*)_resMan->openFetchRes(SR_PALETTE); uint8 *palOut = (uint8*)malloc(256 * 4); for (uint16 cnt = 1; cnt < 256; cnt++) { @@ -197,7 +196,7 @@ uint8 SwordControl::runPanel(void) { delay(1000 / 12); newMode = getClicks(mode, &retVal); } while ((newMode != 1) && (retVal == 0)); - _resMan->resClose(SR_BUTTON); + destroyButtons(); memset(_screenBuf, 0, 640 * 480); _system->copy_rect(_screenBuf, 640, 0, 0, 640, 480); free(_screenBuf); |