src/gui/kernel/qwidget.cpp
branchRCL_3
changeset 14 c0432d11811c
parent 8 3f74d0d4af4c
--- a/src/gui/kernel/qwidget.cpp	Wed Apr 21 12:15:23 2010 +0300
+++ b/src/gui/kernel/qwidget.cpp	Wed Apr 21 20:15:53 2010 +0300
@@ -1487,8 +1487,12 @@
     if (QWidgetPrivate::allWidgets) // might have been deleted by ~QApplication
         QWidgetPrivate::allWidgets->remove(this);
 
-    QEvent e(QEvent::Destroy);
-    QCoreApplication::sendEvent(this, &e);
+    QT_TRY {
+        QEvent e(QEvent::Destroy);
+        QCoreApplication::sendEvent(this, &e);
+    } QT_CATCH(const std::exception&) {
+        // if this fails we can't do anything about it but at least we are not allowed to throw.
+    }
 }
 
 int QWidgetPrivate::instanceCounter = 0;  // Current number of widget instances