mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
Fixed memory leak (as reported by eriktorbjorn)
svn-id: r46938
This commit is contained in:
@@ -318,14 +318,14 @@ void SciGuiGfx::BitsFree(GuiMemoryHandle memoryHandle) {
|
||||
}
|
||||
|
||||
void SciGuiGfx::drawPicture(GuiResourceId pictureId, int16 animationNr, bool mirroredFlag, bool addToFlag, GuiResourceId paletteId) {
|
||||
SciGuiPicture *picture;
|
||||
SciGuiPicture *picture = new SciGuiPicture(_resMan, this, _screen, _palette, pictureId);
|
||||
|
||||
picture = new SciGuiPicture(_resMan, this, _screen, _palette, pictureId);
|
||||
// do we add to a picture? if not -> clear screen with white
|
||||
if (!addToFlag) {
|
||||
if (!addToFlag)
|
||||
ClearScreen(_screen->_colorWhite);
|
||||
}
|
||||
|
||||
picture->draw(animationNr, mirroredFlag, addToFlag, paletteId);
|
||||
delete picture;
|
||||
}
|
||||
|
||||
// This one is the only one that updates screen!
|
||||
|
||||
Reference in New Issue
Block a user