From a6514d1a95d0f84f0935866215463ef6aed23e19 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 7 Feb 2024 23:38:31 +0100 Subject: loader: work toward removing duplicate atlas code --- editor/ground-editor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'editor/ground-editor.cpp') diff --git a/editor/ground-editor.cpp b/editor/ground-editor.cpp index 82a76405..653ad122 100644 --- a/editor/ground-editor.cpp +++ b/editor/ground-editor.cpp @@ -30,7 +30,10 @@ void ground_editor::load_atlases() fm_assert(_atlases.empty()); for (const auto& g : loader.ground_atlas_list()) { - (void)loader.ground_atlas(g.name); + if (g.name != loader.INVALID) [[likely]] + (void)loader.ground_atlas(g.name); + else + loader.make_invalid_ground_atlas(); fm_assert(g.atlas); _atlases[g.name] = &g; } -- cgit v1.2.3