summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_qws.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwidget_qws.cpp')
-rw-r--r--src/gui/kernel/qwidget_qws.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_qws.cpp b/src/gui/kernel/qwidget_qws.cpp
index 4ded5cf..eacf656 100644
--- a/src/gui/kernel/qwidget_qws.cpp
+++ b/src/gui/kernel/qwidget_qws.cpp
@@ -298,11 +298,16 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
d->hide_sys();
}
if (destroyWindow && isWindow()) {
- d->extra->topextra->backingStore->windowSurface->setGeometry(QRect());
+ if (d->extra && d->extra->topextra && d->extra->topextra->backingStore)
+ d->extra->topextra->backingStore->windowSurface->setGeometry(QRect());
qwsDisplay()->destroyRegion(internalWinId());
}
}
- d->setWinId(0);
+ QT_TRY {
+ d->setWinId(0);
+ } QT_CATCH (const std::bad_alloc &) {
+ // swallow - destructors must not throw
+ }
}
}