[Bf-blender-cvs] [ff1ed87] master: Fix crash using "Copy to selected" on ID-props
Campbell Barton
noreply at git.blender.org
Wed Mar 18 08:54:07 CET 2015
Commit: ff1ed872d93b5c40f1de599d79084d48f213921d
Author: Campbell Barton
Date: Wed Mar 18 18:50:33 2015 +1100
Branches: master
https://developer.blender.org/rBff1ed872d93b5c40f1de599d79084d48f213921d
Fix crash using "Copy to selected" on ID-props
===================================================================
M source/blender/makesrna/intern/rna_access.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 2a0fd14..06fdf6d 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -6517,6 +6517,12 @@ bool RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop,
/* In case of IDProperty, we have to find the *real* idprop of ptr,
* since prop in this case is just a fake wrapper around actual IDProp data, and not a 'real' PropertyRNA. */
prop = (PropertyRNA *)rna_idproperty_find(ptr, ((IDProperty *)fromprop)->name);
+
+ /* its possible the custom-prop doesn't exist on this datablock */
+ if (prop == NULL) {
+ return false;
+ }
+
/* Even though currently we now prop will always be the 'fromprop', this might not be the case in the future. */
if (prop == fromprop) {
fromprop = (PropertyRNA *)rna_idproperty_find(fromptr, ((IDProperty *)prop)->name);
More information about the Bf-blender-cvs
mailing list