From 6b0a93110454cc8d84d0d9b9b29fe9d0ecbaa4d5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 9 May 2018 22:08:23 +0300 Subject: [PATCH] Fix a bug in ProgramData when all uniforms in a block are removed Program blocks continued using the previously generated uniform blocks, but because the uniform values were removed the blocks were not updated anymore. --- source/programdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/programdata.cpp b/source/programdata.cpp index a0e0e8bc..79a8bb1b 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -455,7 +455,7 @@ ProgramData::ProgramBlock::ProgramBlock(): ProgramData::ProgramBlock::ProgramBlock(int p, SharedBlock *b): bind_point(p), - block(b ? b->block : 0), + block((b && b->used) ? b->block : 0), shared(b) { } -- 2.45.2