diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-18 10:50:33 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-24 17:47:47 +0300 |
commit | f71f559d038207bf936e7b7ae64d0dd7a728005b (patch) | |
tree | 86c0f3c996ff8d43521d7ffa0daad290112a18be | |
parent | 163d99b7a9ff20010b106ae7ea027cb363a15552 (diff) |
Fix crash using "Copy to selected" on ID-props
-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 c3499d0b139..6c72cf9102e 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); |