Skip to content

Commit

Permalink
KOTOR: Fix segmentation fault when changing minimap
Browse files Browse the repository at this point in the history
  • Loading branch information
vkremianskii committed Jun 1, 2018
1 parent 60022dd commit f165c47
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engines/kotor/gui/ingame/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/

#include "src/graphics/windowman.h"
#include "src/graphics/graphics.h"

#include "src/engines/kotor/gui/ingame/hud.h"
#include "src/engines/kotor/gui/widgets/kotorwidget.h"
Expand Down Expand Up @@ -129,8 +130,12 @@ void HUD::setMinimap(const Common::UString &map, int northAxis,
return;
}

GfxMan.lockFrame();

_minimap.reset(new Minimap(map, northAxis, mapPt1X, mapPt1Y, mapPt2X, mapPt2Y, worldPt1X, worldPt1Y, worldPt2X, worldPt2Y));
mapView->setSubScene(_minimap.get());

GfxMan.unlockFrame();
}

void HUD::setPosition(float x, float y) {
Expand Down

0 comments on commit f165c47

Please sign in to comment.