mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
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:
parent
2b8765b47e
commit
e76a7fc577
1 changed files with 3 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue