[Bf-blender-cvs] [90e1b83] master: Fix T43890: Crash, Alt-D over operator redo button

Campbell Barton noreply at git.blender.org
Wed Mar 4 23:11:21 CET 2015


Commit: 90e1b83696b7a134d47a27f47e11762b8f57d65e
Author: Campbell Barton
Date:   Thu Mar 5 09:10:16 2015 +1100
Branches: master
https://developer.blender.org/rB90e1b83696b7a134d47a27f47e11762b8f57d65e

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

===================================================================

M	source/blender/editors/animation/drivers.c

===================================================================

diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 5799101..67ba82f 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -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) {




More information about the Bf-blender-cvs mailing list