diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-07-23 14:16:32 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2010-08-04 03:46:16 (GMT) |
commit | fb8beb538b2f488eac50eddf605c3f2a0d21b0b1 (patch) | |
tree | 3a2eb7c7094f6707faa6ec0f32a7dd85f3bbbe3b /src/gui | |
parent | 1bc84c1c8ff6e252a8afe1dec0c9ae0fda5993a5 (diff) | |
download | Qt-fb8beb538b2f488eac50eddf605c3f2a0d21b0b1.zip Qt-fb8beb538b2f488eac50eddf605c3f2a0d21b0b1.tar.gz Qt-fb8beb538b2f488eac50eddf605c3f2a0d21b0b1.tar.bz2 |
Ensure backing store is deleted before top-level window
If this is not done, later deletion of the backing store may cause
a crash. If the backing store is an EGL surface, its destruction
includes a call to eglDestroySurface(), which triggers an exception
if the window handle passed as a parameter is no longer valid.
Task-number: QTBUG-10643
Task-number: QTBUG-11376
Reviewed-by: Jason Barron
(cherry picked from commit cc3c416682791e1a2fd61d9a473ba3b4715c502d)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 8d37c5c..424f1f1 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -382,6 +382,10 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop) QSymbianControl::~QSymbianControl() { + // Ensure backing store is deleted before the top-level + // window is destroyed + qt_widget_private(qwidget)->topData()->backingStore.destroy(); + if (S60->curWin == this) S60->curWin = 0; if (!QApplicationPrivate::is_app_closing) { |