Fix: is_overridable crash with certain ShapeKey functions parameters #118453

Open
Philipp Oeser wants to merge 1 commits from lichtwerk/blender:106406 into blender-v4.1-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 5 additions and 0 deletions

View File

@ -58,6 +58,11 @@ const EnumPropertyItem rna_enum_keyblock_type_items[] = {
static Key *rna_ShapeKey_find_key(ID *id)
{
/* Can happen e.g. if we query `is_overridable` on ShapeKey bl_rna normals functions. */
if (id == nullptr) {
return nullptr;
}
switch (GS(id->name)) {
case ID_CU_LEGACY:
return ((Curve *)id)->key;