summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 7ff2c8850..d4c188bfb 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -31,6 +31,7 @@
#include "keyboardconfig.h"
#include "localplayer.h"
#include "map.h"
+#include "maplayer.h"
#include "textmanager.h"
#include "gui/beingpopup.h"
@@ -878,7 +879,7 @@ bool Viewport::isPopupMenuVisible()
void Viewport::moveCameraToActor(int actorId, int x, int y)
{
- if (!player_node)
+ if (!player_node || !actorSpriteManager)
return;
Actor *actor = actorSpriteManager->findBeing(actorId);