Fix game-property use-after-free error

D1538 by @hal01
This commit is contained in:
Campbell Barton
2015-10-07 11:04:23 +11:00
parent f834cb0356
commit f456c8d8d3

View File

@@ -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));
}