diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-01-13 14:41:28 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-01-15 15:45:23 +0100 |
commit | 07c33ab76f353f6dbb6103d7777cbef242b8f3f7 (patch) | |
tree | c28d9e83b8c5d4e84e3b53dacb30eec92e9ae6fe /src | |
parent | bdccc51bc1d794a3932c888a3e50bfbe32e079d3 (diff) |
Guard against null-nativeParent in QWidgetBackingStore::markDirtyOnScreen
The back port in 1e310b5a4508f removed the check in two of the call sites
for this function, that in 5.14 were handled elsewhere, but for 5.12 caused
us to not guard against null-nativeParent windows anymore.
Change-Id: I698c5a0b6a54bbee37b533fcafa75129768c5db1
Fixes: QTBUG-81315
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src')
-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; |