diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-01-29 10:47:02 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-01-29 10:49:58 (GMT) |
commit | b9da3c5129b8c24e89db1f349587c6b72bfe5876 (patch) | |
tree | d43cc8f56dcf59cb6dea89a592f7c2b36945e983 /src/gui/kernel | |
parent | 36a2b5f899b35d4ed14f4c6a229c7888e10c5fd8 (diff) | |
download | Qt-b9da3c5129b8c24e89db1f349587c6b72bfe5876.zip Qt-b9da3c5129b8c24e89db1f349587c6b72bfe5876.tar.gz Qt-b9da3c5129b8c24e89db1f349587c6b72bfe5876.tar.bz2 |
Carbon: crash problem in QWidgetPrivate::hide_sys, v2
See change: f842ec12706. Needed some ekstra checks for
the cocoa port as well.
Task-number: QTBUG-4227
Reviewed-by: Prasanth
(cherry picked from commit ebf9c943b789bb4ce1e1222ed17cc37bd0b1f1fe)
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index f61d2fe..d255604 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -644,6 +644,8 @@ extern "C" { - (void)mouseEntered:(NSEvent *)event { + if (qwidgetprivate->data.in_destructor) + return; QEvent enterEvent(QEvent::Enter); NSPoint windowPoint = [event locationInWindow]; NSPoint globalPoint = [[event window] convertBaseToScreen:windowPoint]; diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 7396ae3..78c1562 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3510,7 +3510,7 @@ void QWidgetPrivate::hide_sys() if (!QWidget::mouseGrabber()){ QWidget *enterWidget = QApplication::widgetAt(QCursor::pos()); - if (enterWidget->data->in_destructor) + if (enterWidget && enterWidget->data->in_destructor) enterWidget = 0; QApplicationPrivate::dispatchEnterLeave(enterWidget, qt_mouseover); qt_mouseover = enterWidget; |