Crash fix for RenderableWebEntityItem::buildWebSurface

Gracefully handle the absence of a gl context.  We will continue to retry every render call.
This commit is contained in:
Anthony J. Thibault 2016-10-10 13:57:54 -07:00
parent 2b8765b47e
commit e76a7fc577

View file

@ -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) {