From 06b038a1c15d1486fc3466050391e12d22b5356a Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Tue, 15 Oct 2019 20:37:28 +0100 Subject: GUI: Fix crash when clicking and dragging a tab widget --- gui/widgets/tab.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp index 0305b57061..d373bc9222 100644 --- a/gui/widgets/tab.cpp +++ b/gui/widgets/tab.cpp @@ -221,7 +221,8 @@ void TabWidget::handleMouseDown(int x, int y, int button, int clickCount) { } void TabWidget::handleMouseMoved(int x, int y, int button) { - assert(y < _tabHeight); + if (y < 0 || y >= _tabHeight) + return; if (x < 0) return; -- cgit v1.2.3