From 19f89a083f25c2d69619cfef7df5817d86292ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Thu, 10 Jul 2014 13:02:22 +0200 Subject: Fix for invalid memory access in graph editor when deleting the last vertex in a fcurve. --- source/blender/editors/space_action/action_edit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_action') diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 08dd00c08fe..091d3fe56b4 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -878,8 +878,10 @@ static bool delete_action_keys(bAnimContext *ac) changed = delete_fcurve_keys(fcu); /* Only delete curve too if it won't be doing anything anymore */ - if ((fcu->totvert == 0) && (list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) == 0)) + if ((fcu->totvert == 0) && (list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) == 0)) { ANIM_fcurve_delete_from_animdata(ac, adt, fcu); + ale->key_data = NULL; + } } if (changed) { -- cgit v1.2.3