summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-03 19:54:22 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-05 16:11:23 +0100
commit8b45afbbebeda5e4eef6d15a232f63ced0958135 (patch)
tree16bf4d82c6d140a72f18c450dd36c9f701a60564 /src
parentcd8c1a4d5c63336b6d6ee212ad6cfdc52bad01c7 (diff)
downloadmana-client-8b45afbbebeda5e4eef6d15a232f63ced0958135.tar.gz
mana-client-8b45afbbebeda5e4eef6d15a232f63ced0958135.tar.bz2
mana-client-8b45afbbebeda5e4eef6d15a232f63ced0958135.tar.xz
mana-client-8b45afbbebeda5e4eef6d15a232f63ced0958135.zip
Fixed crash when the map couldn't be loaded
Ignore LocalPlayer::setDestination calls in this case, because it relies on the tile size of the current map. Reviewed-by: Erik Schilling
Diffstat (limited to 'src')
-rw-r--r--src/localplayer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 353f75c7..eb92fbab 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -682,6 +682,9 @@ void LocalPlayer::setTarget(Being *target)
void LocalPlayer::setDestination(int x, int y)
{
+ if (!mMap)
+ return;
+
int srcX = x;
int srcY = y;
int dstX = (int)mDest.x;