]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix an apparent logic bug in ProgramData
authorMikko Rasa <tdb@tdb.fi>
Fri, 17 Sep 2021 23:18:53 +0000 (02:18 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 17 Sep 2021 23:18:53 +0000 (02:18 +0300)
Deleting the blocks but leaving the pointers seems like a recipe for
disaster.  This hails from all the way back in 5ae4b00.

source/render/programdata.cpp

index e8e30e6344c8d4ca6c982027bab6f73195376bfd..915444d8595e379e8edd250f61c1cc9df73018b8 100644 (file)
@@ -67,6 +67,7 @@ ProgramData &ProgramData::operator=(const ProgramData &other)
 
        for(SharedBlock &b: blocks)
                delete b.block;
+       blocks.clear();
        programs.clear();
 
        last_buffer_block = 0;