diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-03-07 07:37:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-03-07 07:37:14 +0400 |
commit | 6ddd54f5a5cad17d7d5e8b7b48a4616d71267aaa (patch) | |
tree | 32093bb63625988cdbc2ed6daeadb3fb78f8561d /source | |
parent | 03af4cbf9173dd0440517dd0b9f8d464a4ec0350 (diff) |
Fix T38990: Crash in mask shape re-key
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mask/mask_shapekey.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/mask/mask_shapekey.c b/source/blender/editors/mask/mask_shapekey.c index cea350219c0..9dcc0aa063d 100644 --- a/source/blender/editors/mask/mask_shapekey.c +++ b/source/blender/editors/mask/mask_shapekey.c @@ -272,16 +272,18 @@ static int mask_shape_key_rekey_exec(bContext *C, wmOperator *op) } if (masklay->splines_shapes.first) { - MaskLayerShape *masklay_shape; + MaskLayerShape *masklay_shape, *masklay_shape_next; MaskLayerShape *masklay_shape_lastsel = NULL; for (masklay_shape = masklay->splines_shapes.first; masklay_shape; - masklay_shape = masklay_shape->next) + masklay_shape = masklay_shape_next) { MaskLayerShape *masklay_shape_a = NULL; MaskLayerShape *masklay_shape_b = NULL; + masklay_shape_next = masklay_shape->next; + /* find contiguous selections */ if (masklay_shape->flag & MASK_SHAPE_SELECT) { if (masklay_shape_lastsel == NULL) { @@ -293,6 +295,9 @@ static int mask_shape_key_rekey_exec(bContext *C, wmOperator *op) masklay_shape_a = masklay_shape_lastsel; masklay_shape_b = masklay_shape; masklay_shape_lastsel = NULL; + + /* this will be freed below, sep over selection */ + masklay_shape_next = masklay_shape->next; } } |