mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 21:47:30 +02:00
Merge pull request #8772 from hyperlogic/bug-fix/web-entity-crash
Crash fix for RenderableWebEntityItem::buildWebSurface
This commit is contained in:
commit
6c63213c78
1 changed files with 3 additions and 0 deletions
|
@ -83,6 +83,9 @@ bool RenderableWebEntityItem::buildWebSurface(EntityTreeRenderer* renderer) {
|
||||||
++_currentWebCount;
|
++_currentWebCount;
|
||||||
// Save the original GL context, because creating a QML surface will create a new context
|
// Save the original GL context, because creating a QML surface will create a new context
|
||||||
QOpenGLContext * currentContext = QOpenGLContext::currentContext();
|
QOpenGLContext * currentContext = QOpenGLContext::currentContext();
|
||||||
|
if (!currentContext) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
QSurface * currentSurface = currentContext->surface();
|
QSurface * currentSurface = currentContext->surface();
|
||||||
|
|
||||||
auto deleter = [](OffscreenQmlSurface* webSurface) {
|
auto deleter = [](OffscreenQmlSurface* webSurface) {
|
||||||
|
|
Loading…
Reference in a new issue