From 7a7b745917d538e61cb5c9d4da1a53804c4ceade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 26 Sep 2016 16:36:38 +0200 Subject: [PATCH] Ensure that QBackingStore::flush() is not used across window hierarchies Change-Id: I0713d7499f32819db4263e36dff58812a9ac763c Reviewed-by: Laszlo Agocs --- src/gui/painting/qbackingstore.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index ceaad61e13..53349dcef4 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -112,6 +112,8 @@ void QBackingStore::flush(const QRegion ®ion, QWindow *win, const QPoint &off } #endif + Q_ASSERT(win == this->window() || this->window()->isAncestorOf(win, QWindow::ExcludeTransients)); + d_ptr->platformBackingStore->flush(win, QHighDpi::toNativeLocalRegion(region, win), QHighDpi::toNativeLocalPosition(offset, win)); }