mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-31 11:43:31 +00:00
Bugfix: possible nullptr dereference in texture sampler
Crashes in some rare cases, e.g. "martin - test random mosscity.milk"
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user