From 95378aa6accda7c377e8a3d3fe1f4b3529be175b Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 4 Oct 2014 17:57:58 +0200 Subject: [PATCH] Fix crash when a magic projectile has no sound defined (Fixes #1967) --- apps/openmw/mwworld/projectilemanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/projectilemanager.cpp b/apps/openmw/mwworld/projectilemanager.cpp index b04f67b00..6eeaa931e 100644 --- a/apps/openmw/mwworld/projectilemanager.cpp +++ b/apps/openmw/mwworld/projectilemanager.cpp @@ -153,7 +153,8 @@ namespace MWWorld Ogre::Vector3 pos(it->mNode->getPosition()); Ogre::Vector3 newPos = pos + direction * duration * speed; - it->mSound->setPosition(newPos); + if (it->mSound.get()) + it->mSound->setPosition(newPos); it->mNode->setPosition(newPos);