Browse Source

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

Mr.doob 11 years ago
parent
commit
884205e82e
1 changed files with 2 additions and 2 deletions
  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;