summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-02-25 13:12:14 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-28 14:20:55 +0000
commite904f5987292811d623d4d0b58fd6b011845ef8f (patch)
tree430066cb21cde1df612373c555daad19f0fc99be /src
parentf89039cbad74f2d7b07145941da06a0b93d18bab (diff)
Assert that QWidgetPrivate::create creates a window
Assert the expected side effect of createTLSysExtra, which might not allocate a window, but must do so in this case (as we have already returned if the QWidget is not a window). Fixes static analyzer warning 2f3bbfe8addb586445e96f8906d6769e Change-Id: I4d5b8651b3510eff8e4a7b25889c0521ba6a4247 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 8cc72e0f634f1406a42c74b864914ccdfb3e58f3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index b4be9bbfe7..99a6a24aff 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1246,6 +1246,7 @@ void QWidgetPrivate::create()
// in case the extra was already valid.
if (!win) {
createTLSysExtra();
+ Q_ASSERT(topData()->window);
win = topData()->window;
}