[Bf-blender-cvs] [f456c8d] master: Fix game-property use-after-free error

Campbell Barton noreply at git.blender.org
Wed Oct 7 02:18:02 CEST 2015


Commit: f456c8d8d35200516dce3a37f37fd3131a5db367
Author: Campbell Barton
Date:   Wed Oct 7 11:04:23 2015 +1100
Branches: master
https://developer.blender.org/rBf456c8d8d35200516dce3a37f37fd3131a5db367

Fix game-property use-after-free error

D1538 by @hal01

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

M	source/blender/blenkernel/intern/property.c

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

diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c
index 100df5f..dc4063b 100644
--- a/source/blender/blenkernel/intern/property.c
+++ b/source/blender/blenkernel/intern/property.c
@@ -142,8 +142,8 @@ void BKE_bproperty_object_set(Object *ob, bProperty *propc)
 	bProperty *prop;
 	prop = BKE_bproperty_object_get(ob, propc->name);
 	if (prop) {
-		BKE_bproperty_free(prop);
 		BLI_remlink(&ob->prop, prop);
+		BKE_bproperty_free(prop);
 	}
 	BLI_addtail(&ob->prop, BKE_bproperty_copy(propc));
 }




More information about the Bf-blender-cvs mailing list