From e76a7fc577a0478d30cef5feb86464cca2b9aa51 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 10 Oct 2016 13:57:54 -0700 Subject: [PATCH] Crash fix for RenderableWebEntityItem::buildWebSurface Gracefully handle the absence of a gl context. We will continue to retry every render call. --- libraries/entities-renderer/src/RenderableWebEntityItem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp index 0b36e9db8b..021edde2c2 100644 --- a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp @@ -83,6 +83,9 @@ bool RenderableWebEntityItem::buildWebSurface(EntityTreeRenderer* renderer) { ++_currentWebCount; // Save the original GL context, because creating a QML surface will create a new context QOpenGLContext * currentContext = QOpenGLContext::currentContext(); + if (!currentContext) { + return false; + } QSurface * currentSurface = currentContext->surface(); auto deleter = [](OffscreenQmlSurface* webSurface) {