diff options
author | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-29 10:55:44 (GMT) |
---|---|---|
committer | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-29 11:05:11 (GMT) |
commit | 660907a80e8a3f23f70cd5039407c0cc679af9f3 (patch) | |
tree | 1c178c08a2bb17f14d9233f6458a8669e79d7c75 | |
parent | d07de7568cdfb1889e4b64fcbe3fcbfa120ae264 (diff) | |
download | Qt-660907a80e8a3f23f70cd5039407c0cc679af9f3.zip Qt-660907a80e8a3f23f70cd5039407c0cc679af9f3.tar.gz Qt-660907a80e8a3f23f70cd5039407c0cc679af9f3.tar.bz2 |
Mac: Fixes a crash in tst_QWidget::updateOnDestroyedSignal
Addendum to change 9b674ddcea7c0ff7912f185474b7d98bc83bd39f.
The problem was that QWidget::paintEngine() (pure virtual) was
called while being in the destructor. The use-case itself
(see above change) is very very corner case, but still,
it shouldn't crash.
Reviewed-by: bnilsen
-rw-r--r-- | src/gui/painting/qbackingstore.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 34df6c9..8fb7a12 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -1510,6 +1510,9 @@ void QWidgetPrivate::invalidateBuffer(const QRect &rect) void QWidgetPrivate::repaint_sys(const QRegion &rgn) { + if (data.in_destructor) + return; + Q_Q(QWidget); if (q->testAttribute(Qt::WA_StaticContents)) { if (!extra) |