Przeglądaj źródła

Merge pull request #34 from cyle/master

added additional check to see if WebGL is supported
deltakosh 12 lat temu
rodzic
commit
ff7b50b999
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      Babylon/babylon.engine.js

+ 2 - 2
Babylon/babylon.engine.js

@@ -11,7 +11,7 @@
             throw new Error("WebGL not supported");
             throw new Error("WebGL not supported");
         }
         }
 
 
-        if (this._gl === undefined) {
+        if (this._gl === undefined || this._gl === null) {
             throw new Error("WebGL not supported");
             throw new Error("WebGL not supported");
         }
         }
 
 
@@ -937,4 +937,4 @@
             return false;
             return false;
         }
         }
     };
     };
-})();
+})();