summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index a7e14983e..e2d6ca054 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -569,7 +569,7 @@ void Gui::setUseCustomCursor(const bool customCursor)
void Gui::handleMouseMoved(const MouseInput &mouseInput)
{
// Check if the mouse leaves the application window.
- if (!mWidgetWithMouseQueue.empty() && (mouseInput.getX() < 0
+ if (mTop && !mWidgetWithMouseQueue.empty() && (mouseInput.getX() < 0
|| mouseInput.getY() < 0 || !mTop->getDimension().isPointInRect(
mouseInput.getX(), mouseInput.getY())))
{