summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qpaintdevicewindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qpaintdevicewindow.cpp')
-rw-r--r--src/gui/kernel/qpaintdevicewindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qpaintdevicewindow.cpp b/src/gui/kernel/qpaintdevicewindow.cpp
index 232e8b5d6d..9c6a255ca7 100644
--- a/src/gui/kernel/qpaintdevicewindow.cpp
+++ b/src/gui/kernel/qpaintdevicewindow.cpp
@@ -188,7 +188,8 @@ bool QPaintDeviceWindow::event(QEvent *event)
if (event->type() == QEvent::UpdateRequest) {
d->paintEventSent = false;
- d->handleUpdateEvent();
+ if (handle()) // platform window may be gone when the window is closed during app exit
+ d->handleUpdateEvent();
return true;
}