diff --git a/apps/openmw/mwscript/animationextensions.cpp b/apps/openmw/mwscript/animationextensions.cpp index 347bbca56..e737d8ea1 100644 --- a/apps/openmw/mwscript/animationextensions.cpp +++ b/apps/openmw/mwscript/animationextensions.cpp @@ -42,6 +42,9 @@ namespace MWScript { MWWorld::Ptr ptr = R()(runtime); + if (!ptr.getRefData().isEnabled()) + return; + std::string group = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); @@ -69,6 +72,9 @@ namespace MWScript { MWWorld::Ptr ptr = R()(runtime); + if (!ptr.getRefData().isEnabled()) + return; + std::string group = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop();