summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-26 23:32:23 -0600
committerJared Adams <jaxad0127@gmail.com>2010-03-27 00:24:27 -0600
commit5d206f2cd27d9908fe27c3c84c866747eedce7dd (patch)
treeca6eca099721a8508b56cf852f763bbf13665821 /src/gui/viewport.cpp
parent73e66042017a6421234d2a8293d0d5c2ca10055b (diff)
downloadmana-5d206f2cd27d9908fe27c3c84c866747eedce7dd.tar.gz
mana-5d206f2cd27d9908fe27c3c84c866747eedce7dd.tar.bz2
mana-5d206f2cd27d9908fe27c3c84c866747eedce7dd.tar.xz
mana-5d206f2cd27d9908fe27c3c84c866747eedce7dd.zip
Fix crash with showing BeingPopup
Reviewed-by: Freeyorp
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 5edbe154..cd94a52d 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -459,7 +459,7 @@ void Viewport::mouseMoved(gcn::MouseEvent &event)
const int y = (event.getY() + (int) mPixelViewY);
mHoverBeing = beingManager->findBeingByPixel(x, y);
- if (mHoverBeing->getType() == Being::PLAYER)
+ if (mHoverBeing && mHoverBeing->getType() == Being::PLAYER)
mBeingPopup->show(getMouseX(), getMouseY(),
static_cast<Player*>(mHoverBeing));
else