diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-07-23 14:16:32 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-07-26 11:32:22 (GMT) |
commit | cc3c416682791e1a2fd61d9a473ba3b4715c502d (patch) | |
tree | 3573c290b45df32c3572cb2b4eaa17c0e395ac78 | |
parent | 498189595db84d3ae780a365d444eda27d627dfe (diff) | |
download | Qt-cc3c416682791e1a2fd61d9a473ba3b4715c502d.zip Qt-cc3c416682791e1a2fd61d9a473ba3b4715c502d.tar.gz Qt-cc3c416682791e1a2fd61d9a473ba3b4715c502d.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
-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 f39b462..d5ff792 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -371,6 +371,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) { |