Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <mano-wii>2021-03-08 16:29:57 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-03-08 16:38:11 +0300
commitb6c07d69e2f022f024c6ec2ff92925dbc6bbd79e (patch)
tree5a213bdb3e7601ee8f3f6cf48e9c9196de4c0d3c /source/blender/editors/space_api
parent171ba4243941770351e8190a1690e4ba61d25abf (diff)
Fix T86106: bpy.types.SpaceView3D.draw_handler_remove(...) causes Blender to crash
The handle of a drawing callback can be removed within the drawing function itself. This causes `var = (type)(((Link *)(var))->next` to read an invalid memory value in C.
Diffstat (limited to 'source/blender/editors/space_api')
-rw-r--r--source/blender/editors/space_api/spacetypes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 1bd8d13b25b..ff05fb3bad6 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -262,7 +262,7 @@ void ED_region_draw_cb_exit(ARegionType *art, void *handle)
void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
{
- LISTBASE_FOREACH (RegionDrawCB *, rdc, &region->type->drawcalls) {
+ LISTBASE_FOREACH_MUTABLE (RegionDrawCB *, rdc, &region->type->drawcalls) {
if (rdc->type == type) {
rdc->draw(C, region, rdc->customdata);