summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-01-29 09:49:14 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-01-29 10:49:37 (GMT)
commit36a2b5f899b35d4ed14f4c6a229c7888e10c5fd8 (patch)
tree732b1d0a381db8a68101af791ee4d0524c0222e7
parent26af4d54ea4f3a48d053038f34a00aa1119a585b (diff)
downloadQt-36a2b5f899b35d4ed14f4c6a229c7888e10c5fd8.zip
Qt-36a2b5f899b35d4ed14f4c6a229c7888e10c5fd8.tar.gz
Qt-36a2b5f899b35d4ed14f4c6a229c7888e10c5fd8.tar.bz2
Carbon: crash problem in QWidgetPrivate::hide_sys
The crash occurs because we at one point try to assign a widget that is marked as 'about to be deleted' to a QPointer, after clearguards has been called. The correct fix is to avoid such an assignment in the first place. Task-number: QTBUG-4227 Reviewed-by: Prasanth (cherry picked from commit f842ec12706b70f94ab5f634dc2aa025ba2cf3f2)
-rw-r--r--src/gui/kernel/qwidget_mac.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index ebfab21..7396ae3 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -3510,6 +3510,8 @@ void QWidgetPrivate::hide_sys()
if (!QWidget::mouseGrabber()){
QWidget *enterWidget = QApplication::widgetAt(QCursor::pos());
+ if (enterWidget->data->in_destructor)
+ enterWidget = 0;
QApplicationPrivate::dispatchEnterLeave(enterWidget, qt_mouseover);
qt_mouseover = enterWidget;
}