summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-08-28 14:42:57 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-08-28 14:45:04 +0200
commitb42b00a36b5b48bffcbccc9b1c7ecafa89b4e18e (patch)
tree6048cc2f8a29f21405a48adc17ab958c3e5fa63b /src/gui/widgets
parent802d8c02eaa0aa9cd8d0c6cbd18cd814e6337bc6 (diff)
Fixes: Crash when double-clicking a tab in a QTabBar with movable tabs
This is a backport of commit 8ac7e81260 Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qtabbar.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index bd4537932c..bdc804c634 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -1844,7 +1844,8 @@ void QTabBarPrivate::_q_moveTabFinished(int index)
Q_Q(QTabBar);
bool cleanup = (pressedIndex == index) || (pressedIndex == -1) || !validIndex(index);
if (animations.isEmpty() && cleanup) {
- movingTab->setVisible(false); // We might not get a mouse release
+ if (movingTab)
+ movingTab->setVisible(false); // We might not get a mouse release
for (int i = 0; i < tabList.count(); ++i) {
tabList[i].dragOffset = 0;
}