add check for missing webgl context in WebGLDrawer.isSupported()

This commit is contained in:
Tom 2024-07-16 14:07:27 -04:00
parent ee6751e02f
commit 37ce7cc256

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();
}