소스 검색

Fix loadTexture

trethaller 7 년 전
부모
커밋
07e5ace22b
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      h3d/prim/ModelCache.hx

+ 3 - 1
h3d/prim/ModelCache.hx

@@ -35,7 +35,9 @@ class ModelCache {
 	}
 
 	public function loadTexture( model : hxd.res.Model, texturePath ) : h3d.mat.Texture {
-		var fullPath = model.entry.path + "@" + texturePath;
+		var fullPath = texturePath;
+		if(model != null)
+			fullPath = model.entry.path + "@" + fullPath;
 		var t = textures.get(fullPath);
 		if( t != null )
 			return t;