diff options
-rw-r--r-- | src/widgets/kernel/qwidgetbackingstore.cpp | 6 |
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 ®ion, 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; |