Merge pull request #8772 from hyperlogic/bug-fix/web-entity-crash

Crash fix for RenderableWebEntityItem::buildWebSurface
This commit is contained in:
Brad Hefta-Gaub 2016-10-10 14:38:05 -07:00 committed by GitHub
commit 6c63213c78

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