Detect wrong path for model

This commit is contained in:
Piotr 2020-10-01 21:26:55 +02:00
parent 3a33c372af
commit e7c29754a6
1 changed files with 7 additions and 1 deletions

View File

@ -31,7 +31,13 @@ impl Model {
.unwrap() .unwrap()
.into(), .into(),
}; };
model.load_model(path, diff_texture, cache);
if pathObj.exists() {
model.load_model(path, diff_texture, cache);
} else {
warn!("{} does not exist, returning empty model", path);
}
model model
} }