trethaller 7 лет назад
Родитель
Сommit
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;