src/gui/kernel/qwidget.cpp
changeset 22 79de32ba3296
parent 19 fcece45ef507
child 30 5dc02b23752f
--- a/src/gui/kernel/qwidget.cpp	Mon May 03 13:17:34 2010 +0300
+++ b/src/gui/kernel/qwidget.cpp	Fri May 14 16:40:13 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