Skip to content

Commit bd9f68e

Browse files
committed
Bugfix: possible nullptr dereference in texture sampler
Crashes in some rare cases, e.g. "martin - test random mosscity.milk"
1 parent ceb86eb commit bd9f68e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libprojectM/Renderer/TextureSamplerDescriptor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TextureSamplerDescriptor::TextureSamplerDescriptor(const std::shared_ptr<class T
2020

2121
auto TextureSamplerDescriptor::Empty() const -> bool
2222
{
23-
return m_texture->Empty();
23+
return !m_texture || m_texture->Empty();
2424
}
2525

2626
void TextureSamplerDescriptor::Bind(GLint unit, const Shader& shader) const

0 commit comments

Comments
 (0)