DRW: Fix T54135 : Crash caused by wrongly iterating over ListBase.
This commit is contained in:
parent
d4795cc5d1
commit
8115162e98
Notes:
blender-bot
2023-02-14 06:54:28 +01:00
Referenced by issue #54135, Crash when edit mode with clay in 2.79 file (bmw)
|
@ -110,7 +110,7 @@ static void instance_batch_free(Gwn_Batch *batch, void *UNUSED(user_data))
|
|||
/* TODO: Make it thread safe! Batch freeing can happen from another thread. */
|
||||
/* XXX we need to iterate over all idatalists unless we make some smart
|
||||
* data structure to store the locations to update. */
|
||||
for (DRWInstanceDataList *idatalist = g_idatalists.first; idatalist; ++idatalist) {
|
||||
for (DRWInstanceDataList *idatalist = g_idatalists.first; idatalist; idatalist = idatalist->next) {
|
||||
DRWInstancingBuffer *ibuf = idatalist->instancing.ibufs;
|
||||
for (int i = 0; i < idatalist->instancing.alloc_size; i++, ibuf++) {
|
||||
if (ibuf->instance == batch) {
|
||||
|
|
Loading…
Reference in New Issue