summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2016-01-19 13:50:18 +0000
committerSean Harmer <sean.harmer@kdab.com>2016-01-19 14:35:35 +0000
commitb9aded78adcbeac6579d4dbbb5591558f7bc705f (patch)
tree24851ec7bdc87e1d224ae32f656c68f6ddce6d95 /src
parent54b7dcaa11c1c97750a66b00067c1b83a413054b (diff)
Protect against a null surface in the renderview processing logic
Change-Id: I31eab49aff2af5b9d2341709c506f9d5525994ac Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/render/backend/renderer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/render/backend/renderer.cpp b/src/render/backend/renderer.cpp
index 4b94ce00c..e6bf0cf86 100644
--- a/src/render/backend/renderer.cpp
+++ b/src/render/backend/renderer.cpp
@@ -694,6 +694,14 @@ bool Renderer::submitRenderViews()
// If not, we have to free up the context from the previous surface
// and make the context current on the new surface
surface = renderView->surface();
+
+ // For now, if we do not have a surface, skip this renderview
+ // TODO: Investigate if it's worth providing a fallback offscreen surface
+ // to use when surface is null. Or if we should instead expose an
+ // offscreensurface to Qt3D.
+ if (!surface)
+ continue;
+
if (i != 0 && surface != previousSurface && previousSurface)
m_graphicsContext->endDrawing(boundFboId == m_graphicsContext->defaultFBO());