renderer/common/sprite_batch: don't pass NULL to r_uniform_sampler

This commit is contained in:
Andrei Alexeyev 2024-10-03 08:50:44 +02:00
parent 7c82cbba9b
commit 321ba481d9
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -158,7 +158,9 @@ void r_flush_sprites(void) {
r_uniform_sampler("tex", _r_sprite_batch.primary_texture);
for(uint i = 0; i < ARRAY_SIZE(tex_aux_names); ++i) {
r_uniform_sampler(tex_aux_names[i], _r_sprite_batch.aux_textures[i]);
if(_r_sprite_batch.aux_textures[i]) {
r_uniform_sampler(tex_aux_names[i], _r_sprite_batch.aux_textures[i]);
}
}
r_framebuffer(_r_sprite_batch.framebuffer);