From 36a2b5f899b35d4ed14f4c6a229c7888e10c5fd8 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 29 Jan 2010 10:49:14 +0100 Subject: 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) --- src/gui/kernel/qwidget_mac.mm | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v0.12