diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_lattice.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_lattice.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c index b639e874a88..aca5b43a7d5 100644 --- a/source/blender/modifiers/intern/MOD_lattice.c +++ b/source/blender/modifiers/intern/MOD_lattice.c @@ -64,7 +64,12 @@ static bool isDisabled(const struct Scene *UNUSED(scene), { LatticeModifierData *lmd = (LatticeModifierData *)md; - return !lmd->object; + /* The object type check is only needed here in case we have a placeholder + * object assigned (because the library containing the lattice is missing). + * + * In other cases it should be impossible to have a type missmatch. + */ + return !lmd->object || lmd->object->type != OB_LATTICE; } static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) |