aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorCameron Cawley2019-10-15 20:37:28 +0100
committerThierry Crozat2019-10-15 20:37:28 +0100
commit06b038a1c15d1486fc3466050391e12d22b5356a (patch)
treeeb1b384b2d87e31ac0cd57a588f8aa21d33b75d8 /gui
parentb8e7f45760d935af90588754cce6ab378adffb0c (diff)
downloadscummvm-rg350-06b038a1c15d1486fc3466050391e12d22b5356a.tar.gz
scummvm-rg350-06b038a1c15d1486fc3466050391e12d22b5356a.tar.bz2
scummvm-rg350-06b038a1c15d1486fc3466050391e12d22b5356a.zip
GUI: Fix crash when clicking and dragging a tab widget
Diffstat (limited to 'gui')
-rw-r--r--gui/widgets/tab.cpp3
1 files changed, 2 insertions, 1 deletions
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;