Browse Source

Add guard for IE11 and Edge that don't support lose_context extension.

Michael Bond 8 years ago
parent
commit
c1ad4e0bed
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/renderers/WebGLRenderer.js

+ 5 - 1
src/renderers/WebGLRenderer.js

@@ -373,7 +373,11 @@ function WebGLRenderer( parameters ) {
 
 
 	this.forceContextLoss = function () {
 	this.forceContextLoss = function () {
 
 
-		extensions.get( 'WEBGL_lose_context' ).loseContext();
+		if (extensions.get( 'WEBGL_lose_context' )) {
+
+			extensions.get( 'WEBGL_lose_context' ).loseContext();
+
+		}
 
 
 	};
 	};