Fix T43890: Crash, Alt-D over operator redo button

This commit is contained in:
Campbell Barton 2015-03-05 09:10:16 +11:00
parent ffee7f1a58
commit 90e1b83696
Notes: blender-bot 2023-02-14 09:24:57 +01:00
Referenced by issue #43911, Cloth Physics Bending
Referenced by issue #43900, operator_mesh_add.py template error
Referenced by issue #43890, Crash, when using Alt-D with mouse over input field
1 changed files with 5 additions and 2 deletions

View File

@ -494,8 +494,11 @@ static int remove_driver_button_exec(bContext *C, wmOperator *op)
if (ptr.id.data && ptr.data && prop) {
char *path = BKE_animdata_driver_path_hack(C, &ptr, prop, NULL);
success = ANIM_remove_driver(op->reports, ptr.id.data, path, index, 0);
MEM_freeN(path);
if (path) {
success = ANIM_remove_driver(op->reports, ptr.id.data, path, index, 0);
MEM_freeN(path);
}
}
if (success) {