소스 검색

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