summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-14 15:56:12 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-14 15:56:12 +0100
commit0fd9ee5a349ab2e190f25305508a1dc8c40c916d (patch)
tree7184195e2a6641fdaff745f498be261da35d7a09
parent8f7b089e246b5e55d1cacb756da4219bb751236f (diff)
fix loading invalid atlas
-rw-r--r--editor/scenery-json.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/scenery-json.cpp b/editor/scenery-json.cpp
index e2bf24a6..48ab287f 100644
--- a/editor/scenery-json.cpp
+++ b/editor/scenery-json.cpp
@@ -10,7 +10,10 @@ void scenery_editor::load_atlases()
{
_atlases.clear();
for (const auto& s : loader.scenery_list())
- _atlases[s.name] = { s.name, loader.scenery(s.name) };
+ _atlases[s.name] = {
+ .name = s.name,
+ .proto = loader.scenery(s.name, s.name == loader.INVALID ? loader_policy::ignore : loader_policy::error)
+ };
}
} // namespace floormat