diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-09 17:47:42 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-10-10 18:34:44 +0000 |
commit | 54fdc4de7963437642704c2bcf339979aa4f8734 (patch) | |
tree | 77b5ad7c0c60a8bc147bde28dbea421f4df43f07 /src | |
parent | d1ac941ce74af8aabfc2aa522e48ba826d3080f6 (diff) |
Fix QQuickRenderControl::invalidate with software renderer
With the software renderer QQuickRenderControl::initialize() is never
called, but we still need to cleanup scenegraph nodes on destruction or
invalidation.
Change-Id: I4c17a440d683b1f0512fb8a9370430cf3680d8ee
Task-number: QTBUG-70740
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickrendercontrol.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/items/qquickrendercontrol.cpp b/src/quick/items/qquickrendercontrol.cpp index ec74660d96..025acefec2 100644 --- a/src/quick/items/qquickrendercontrol.cpp +++ b/src/quick/items/qquickrendercontrol.cpp @@ -312,9 +312,6 @@ bool QQuickRenderControl::sync() void QQuickRenderControl::invalidate() { Q_D(QQuickRenderControl); - if (!d->initialized) - return; - if (!d->window) return; @@ -322,6 +319,9 @@ void QQuickRenderControl::invalidate() cd->fireAboutToStop(); cd->cleanupNodesOnShutdown(); + if (!d->initialized) + return; + // We must invalidate since the context can potentially be destroyed by the // application right after returning from this function. Invalidating is // also essential to allow a subsequent initialize() to succeed. |