浏览代码

UI: Check whether image is undefined.
Fixed editor animation breakage somehow.

Mr.doob 11 年之前
父节点
当前提交
884205e82e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      editor/js/libs/ui.three.js

+ 2 - 2
editor/js/libs/ui.three.js

@@ -98,7 +98,7 @@ UI.Texture.prototype.setValue = function ( texture ) {
 
 		var image = texture.image;
 
-		if ( image.width > 0 ) {
+		if ( image !== undefined && image.width > 0 ) {
 
 			name.value = texture.sourceFile;
 
@@ -232,7 +232,7 @@ UI.CubeTexture.prototype.setValue = function ( texture ) {
 
 		var image = texture.image[ 0 ];
 
-		if ( image.width > 0 ) {
+		if ( image !== undefined && image.width > 0 ) {
 
 			name.value = texture.sourceFile;