浏览代码

- added additional check to see if WebGL is supported

cyle 12 年之前
父节点
当前提交
ee2733030f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Babylon/babylon.engine.js

+ 2 - 2
Babylon/babylon.engine.js

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