]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix a bug in ProgramData when all uniforms in a block are removed
authorMikko Rasa <tdb@tdb.fi>
Wed, 9 May 2018 19:08:23 +0000 (22:08 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 9 May 2018 19:08:23 +0000 (22:08 +0300)
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

index a0e0e8bc61376b814f28af1439f01329d8e7e61e..79a8bb1bd98fe434542504487bdcf5f23b047e50 100644 (file)
@@ -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)
 { }