diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-09-03 14:58:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-09-03 14:58:52 +0300 |
commit | f9ccd26b037d43f2490d1f0263e45e775d30473d (patch) | |
tree | dc0000ca166359e0820174f0a5b59cf3ce86c758 /source/blender/python/intern | |
parent | 0950cfd9d53ef666cf820765e83586f72b04e9b6 (diff) |
Fix T87768: `.path_resolve` fails when requested property is None.
Add a version of RNA_path_resolve_full that returns true
when the path resolves to a NULL RNA pointer.
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 9d0755a865d..35acb56e66a 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -3663,7 +3663,7 @@ static PyObject *pyrna_struct_path_resolve(BPy_StructRNA *self, PyObject *args) return NULL; } - if (RNA_path_resolve_full(&self->ptr, path, &r_ptr, &r_prop, &index)) { + if (RNA_path_resolve_full_maybe_null(&self->ptr, path, &r_ptr, &r_prop, &index)) { if (r_prop) { if (index != -1) { if (index >= RNA_property_array_length(&r_ptr, r_prop) || index < 0) { |