summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r--src/gui/kernel/qwidget_mac.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 999faeb..3dd2e65 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2618,7 +2618,11 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
qt_mac_destructWindow(window);
}
}
- d->setWinId(0);
+ QT_TRY {
+ d->setWinId(0);
+ } QT_CATCH (const std::bad_alloc &) {
+ // swallow - destructors must not throw
+ }
}
}