[Bf-blender-cvs] [f71f559] blender-v2.74-release: Fix crash using "Copy to selected" on ID-props
Campbell Barton
noreply at git.blender.org
Tue Mar 24 15:59:25 CET 2015
Commit: f71f559d038207bf936e7b7ae64d0dd7a728005b
Author: Campbell Barton
Date: Wed Mar 18 18:50:33 2015 +1100
Branches: blender-v2.74-release
https://developer.blender.org/rBf71f559d038207bf936e7b7ae64d0dd7a728005b
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 c3499d0..6c72cf9 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -6497,6 +6497,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