Fix memory leak in DRW_cache_gpencil_axes_get

The Batch was created using old function without  GPU_BATCH_OWNS_VBO and the batch was not removed from memory
This commit is contained in:
2018-07-31 13:21:04 +02:00
parent 8dcddbc091
commit 7a91ae1103

View File

@@ -605,7 +605,7 @@ GPUBatch *DRW_cache_gpencil_axes_get(void)
GPU_vertbuf_attr_set(vbo, pos_id, i + 6, verts[indices[i]]);
}
SHC.drw_gpencil_axes = GPU_batch_create(GPU_PRIM_LINES, vbo, NULL);
SHC.drw_gpencil_axes = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
}
return SHC.drw_gpencil_axes;
}