mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:58:03 +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;
|
++_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