mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
fix fatal exception caused by empty skeleton model texture name
This commit is contained in:
parent
9ac8406558
commit
fc04284b34
1 changed files with 1 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ void ModelBatch::setLightsOffset(const glm::vec3& offset) {
|
||||||
|
|
||||||
void ModelBatch::setTexture(const std::string& name,
|
void ModelBatch::setTexture(const std::string& name,
|
||||||
const texture_names_map* varTextures) {
|
const texture_names_map* varTextures) {
|
||||||
if (varTextures && name.at(0) == '$') {
|
if (varTextures && !name.empty() && name.at(0) == '$') {
|
||||||
const auto& found = varTextures->find(name);
|
const auto& found = varTextures->find(name);
|
||||||
if (found == varTextures->end()) {
|
if (found == varTextures->end()) {
|
||||||
return batch->setTexture(nullptr);
|
return batch->setTexture(nullptr);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue