game-strings: fix crash with -l/--level

This commit is contained in:
Marcin Kurczewski 2025-04-26 19:41:37 +02:00
parent 88f41c5a75
commit f27d0435a9

View file

@ -124,7 +124,7 @@ static void M_ApplyLayer(
}
}
if (gs_level_table != nullptr) {
if (gs_level_table != nullptr && gs_level_table->count != 0) {
ASSERT(level->num >= 0);
ASSERT(level->num < gs_level_table->count);
M_Apply(&gs_level_table->entries[level->num].table);