Merge pull request #2557 from pearcetm/acceleration-test

add check for missing webgl context in WebGLDrawer.isSupported()
This commit is contained in:
Ian Gilman 2024-07-17 09:16:58 -07:00 committed by GitHub
commit 2db1c2f1da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -195,7 +195,7 @@
let canvasElement = document.createElement( 'canvas' );
let webglContext = $.isFunction( canvasElement.getContext ) &&
canvasElement.getContext( 'webgl' );
let ext = webglContext.getExtension('WEBGL_lose_context');
let ext = webglContext && webglContext.getExtension('WEBGL_lose_context');
if(ext){
ext.loseContext();
}