summaryrefslogtreecommitdiffstats
path: root/src/render/renderers/opengl/graphicshelpers
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2019-10-20 18:46:16 +0100
committerMike Krus <mike.krus@kdab.com>2019-10-21 09:52:59 +0100
commit3281951ccc9b607ffaf41d8425b3e3cce3936fd1 (patch)
tree58abafd7b2092eb0559d497a63e1522385303d43 /src/render/renderers/opengl/graphicshelpers
parentce4663c2659d9e1611a1647a9b3cd26da8a80604 (diff)
Fix Coverity warnings
Change-Id: I00c875b48d838170fddf0b92f0ac5592828c6f0f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/renderers/opengl/graphicshelpers')
-rw-r--r--src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp b/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp
index 4b4199820..4d42b6291 100644
--- a/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp
+++ b/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp
@@ -538,9 +538,9 @@ GLuint SubmissionContext::updateRenderTarget(Qt3DCore::QNodeId renderTargetNodeI
// ### TODO QTBUG-64757 this check is insufficient since the
// texture may have changed to another one with the same size. That
// case is not handled atm.
- needsResize |= (rTex != nullptr && rTex->size() != s);
- if (isActiveRenderTarget) {
- if (attachment.m_point == QRenderTargetOutput::Color0)
+ if (rTex) {
+ needsResize |= rTex->size() != s;
+ if (isActiveRenderTarget && attachment.m_point == QRenderTargetOutput::Color0)
m_renderTargetFormat = rTex->properties().format;
}
}