From cb8cf72736b71da13f72f5c2c9266d3dadbfddcd Mon Sep 17 00:00:00 2001 From: codereader Date: Mon, 26 Dec 2022 17:52:07 +0100 Subject: [PATCH] #6195: Fix crash when trying to apply an anim to the null model --- libs/entitylib.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/entitylib.h b/libs/entitylib.h index 01713b37d3..abe74fc01a 100644 --- a/libs/entitylib.h +++ b/libs/entitylib.h @@ -243,6 +243,8 @@ inline void applyIdlePose(const INodePtr& node, const IModelDef::Ptr& modelDef) // Set the animation to play auto md5model = dynamic_cast(&(modelNode->getIModel())); + if (!md5model) return; + // Look up the "idle" anim if there is one auto found = modelDef->getAnim("idle");