diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-18 10:50:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-18 10:53:32 +0300 |
commit | ff1ed872d93b5c40f1de599d79084d48f213921d (patch) | |
tree | 01d8f8f1ffcadec8ab92300ab331ec393213689e /source/blender | |
parent | 29195197147a882849859ea963cae42484dfeaba (diff) |
Fix crash using "Copy to selected" on ID-props
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 2a0fd14e13b..06fdf6d3b77 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); |