From fc04284b34d5dfc8afd008933b61644dda6b73c6 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 28 Feb 2026 03:01:37 +0300 Subject: [PATCH] fix fatal exception caused by empty skeleton model texture name --- src/graphics/render/ModelBatch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/render/ModelBatch.cpp b/src/graphics/render/ModelBatch.cpp index cefe94ac1..35e891aff 100644 --- a/src/graphics/render/ModelBatch.cpp +++ b/src/graphics/render/ModelBatch.cpp @@ -135,7 +135,7 @@ void ModelBatch::setLightsOffset(const glm::vec3& offset) { void ModelBatch::setTexture(const std::string& name, const texture_names_map* varTextures) { - if (varTextures && name.at(0) == '$') { + if (varTextures && !name.empty() && name.at(0) == '$') { const auto& found = varTextures->find(name); if (found == varTextures->end()) { return batch->setTexture(nullptr);