summaryrefslogtreecommitdiff
path: root/src/gui/widgets/characterdisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/characterdisplay.cpp')
-rw-r--r--src/gui/widgets/characterdisplay.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp
index 52f56ae69..bd3f042f9 100644
--- a/src/gui/widgets/characterdisplay.cpp
+++ b/src/gui/widgets/characterdisplay.cpp
@@ -122,9 +122,12 @@ void CharacterDisplay::mouseExited(gcn::MouseEvent &event A_UNUSED)
void CharacterDisplay::mouseMoved(gcn::MouseEvent &event A_UNUSED)
{
+ if (!gui)
+ return;
+
int mouseX = 0;
int mouseY = 0;
- SDL_GetMouseState(&mouseX, &mouseY);
+ gui->getMouseState(&mouseX, &mouseY);
const std::string &name = mName->getCaption();
if (!name.empty())
{