trethaller пре 7 година
родитељ
комит
8334a5ba80
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      h3d/prim/ModelCache.hx

+ 2 - 0
h3d/prim/ModelCache.hx

@@ -45,6 +45,8 @@ class ModelCache {
 		try {
 		try {
 			tres = hxd.res.Loader.currentInstance.load(texturePath);
 			tres = hxd.res.Loader.currentInstance.load(texturePath);
 		} catch( error : hxd.res.NotFound ) {
 		} catch( error : hxd.res.NotFound ) {
+			if(model == null)
+				throw error;
 			// try again to load into the current model directory
 			// try again to load into the current model directory
 			var path = model.entry.directory;
 			var path = model.entry.directory;
 			if( path != "" ) path += "/";
 			if( path != "" ) path += "/";