From 8b45afbbebeda5e4eef6d15a232f63ced0958135 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Fri, 3 Feb 2012 19:54:22 +0100 Subject: 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 --- src/localplayer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/localplayer.cpp') 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; -- cgit v1.2.3-60-g2f50