summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-08-28 12:42:57 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-08-28 12:45:04 (GMT)
commitb42b00a36b5b48bffcbccc9b1c7ecafa89b4e18e (patch)
tree6048cc2f8a29f21405a48adc17ab958c3e5fa63b /src/gui
parent802d8c02eaa0aa9cd8d0c6cbd18cd814e6337bc6 (diff)
downloadQt-b42b00a36b5b48bffcbccc9b1c7ecafa89b4e18e.zip
Qt-b42b00a36b5b48bffcbccc9b1c7ecafa89b4e18e.tar.gz
Qt-b42b00a36b5b48bffcbccc9b1c7ecafa89b4e18e.tar.bz2
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')
-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 bd45379..bdc804c 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;
}