Bugfix: possible nullptr dereference in texture sampler

Crashes in some rare cases, e.g. "martin - test random mosscity.milk"
This commit is contained in:
Kai Blaschke
2026-02-15 23:34:10 +01:00
parent ceb86ebca7
commit bd9f68e199

View File

@ -20,7 +20,7 @@ TextureSamplerDescriptor::TextureSamplerDescriptor(const std::shared_ptr<class T
auto TextureSamplerDescriptor::Empty() const -> bool
{
return m_texture->Empty();
return !m_texture || m_texture->Empty();
}
void TextureSamplerDescriptor::Bind(GLint unit, const Shader& shader) const