From 508c57d6e21f6b538579c2efa1858c701c920217 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 7 Jun 2015 17:09:37 +0200 Subject: [PATCH] addEffect crash fix for objects with no model --- apps/openmw/mwrender/animation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 6af8a49a4b..d92e57f19f 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -1048,6 +1048,9 @@ namespace MWRender void Animation::addEffect (const std::string& model, int effectId, bool loop, const std::string& bonename, std::string texture) { + if (!mObjectRoot.get()) + return; + // Early out if we already have this effect for (std::vector::iterator it = mEffects.begin(); it != mEffects.end(); ++it) if (it->mLoop && loop && it->mEffectId == effectId && it->mBoneName == bonename)