Pārlūkot izejas kodu

Editor: Fix broken material tab when `Texture.image` is null. (#25703)

Michael Herzog 2 gadi atpakaļ
vecāks
revīzija
728bfed871
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      editor/js/libs/ui.three.js

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

@@ -146,7 +146,7 @@ class UITexture extends UISpan {
 
 
 			const image = texture.image;
 			const image = texture.image;
 
 
-			if ( image !== undefined && image.width > 0 ) {
+			if ( image !== undefined && image !== null && image.width > 0 ) {
 
 
 				canvas.title = texture.sourceFile;
 				canvas.title = texture.sourceFile;
 				const scale = canvas.width / image.width;
 				const scale = canvas.width / image.width;