LAB: Avoid memory leaks with fonts
This commit is contained in:
parent
7f5826cfcb
commit
3fcd3c1526
5 changed files with 21 additions and 14 deletions
|
@ -1124,6 +1124,9 @@ void LabEngine::go() {
|
|||
_graphics->setUpScreens();
|
||||
|
||||
_event->initMouse();
|
||||
if (_msgFont)
|
||||
_graphics->closeFont(&_msgFont);
|
||||
|
||||
if (getPlatform() != Common::kPlatformAmiga)
|
||||
_msgFont = _resource->getFont("F:AvanteG.12");
|
||||
else
|
||||
|
@ -1137,7 +1140,7 @@ void LabEngine::go() {
|
|||
_event->mouseShow();
|
||||
mainGameLoop();
|
||||
|
||||
_graphics->closeFont(_msgFont);
|
||||
_graphics->closeFont(&_msgFont);
|
||||
_graphics->freePict();
|
||||
|
||||
freeScreens();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue