summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index b9505a6ed0..38ea5966ae 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -717,7 +717,11 @@ void QWidgetBackingStore::markDirtyOnScreen(const QRegion &region, QWidget *widg
// Alien widgets.
if (!hasPlatformWindow(widget) && !widget->isWindow()) {
- QWidget *nativeParent = widget->nativeParentWidget(); // Alien widgets with the top-level as the native parent (common case).
+ QWidget *nativeParent = widget->nativeParentWidget();
+ if (!nativeParent)
+ return;
+
+ // Alien widgets with the top-level as the native parent (common case).
if (nativeParent == tlw) {
dirtyOnScreen += region.translated(topLevelOffset);
return;