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:27 (GMT) |
commit | 2983e4d26a2492408c49a55a0db9173c1df1456c (patch) | |
tree | 9488e54ca319080b32a37fc974d3077ccac9931b | |
parent | a847edefd9e2efd70e63935965624354406f932d (diff) | |
download | Qt-2983e4d26a2492408c49a55a0db9173c1df1456c.zip Qt-2983e4d26a2492408c49a55a0db9173c1df1456c.tar.gz Qt-2983e4d26a2492408c49a55a0db9173c1df1456c.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 0d65811..117c1d5 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) { |