diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-12-23 17:45:55 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-12-23 17:50:31 +0300 |
commit | 9d04fa39d13b75b207fa7ab0315cb7731ecfff06 (patch) | |
tree | 1ce36661e347ceb17b8d79a7754bbea3140ebdae /intern/cycles | |
parent | 635694c0ff8fc5c9828bf920ecb81bb9bf792a82 (diff) |
Fix T84063: crash reading pointer properties in Attribute shader node
Path resolving can find e.g. a datablock rather than a float or integer,
treat that as a failure to find a valid property.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 4a70cbbf41f..5261fbcee07 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -351,6 +351,10 @@ static bool lookup_property(BL::ID b_id, const string &name, float4 *r_value) return false; } + if (prop == NULL) { + return false; + } + PropertyType type = RNA_property_type(prop); int arraylen = RNA_property_array_length(&ptr, prop); |