From c838a413ee15b5ee872769f914f76ed3925b2201 Mon Sep 17 00:00:00 2001 From: mread Date: Tue, 18 Oct 2011 13:51:56 +0100 Subject: Catch potential throw in ~QSymbianControl The call to topData() in ~QSymbianControl can create the required object if it does not already exist. This can then throw an exception if it fails, which is not allowed to escape the destructor. So it is caught and ignored. Task-number: QTBUG-4871 incidental finding Reviewed-by: Shane Kearns --- src/gui/kernel/qapplication_s60.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 7d198ce..f1221eb 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -584,7 +584,11 @@ QSymbianControl::~QSymbianControl() { // Ensure backing store is deleted before the top-level // window is destroyed - qt_widget_private(qwidget)->topData()->backingStore.destroy(); + QT_TRY { + qt_widget_private(qwidget)->topData()->backingStore.destroy(); + } QT_CATCH(const std::exception&) { + // ignore exceptions, nothing can be done + } if (S60->curWin == this) S60->curWin = 0; -- cgit v0.12