From 53158d29b17a96ff3a3c9474d636221b383039d7 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 5 Dec 2015 01:54:16 +0100 Subject: [PATCH 1/2] stopSound crash fix --- apps/openmw/mwsound/soundmanagerimp.cpp | 3 ++- apps/openmw/mwsound/soundmanagerimp.hpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwsound/soundmanagerimp.cpp b/apps/openmw/mwsound/soundmanagerimp.cpp index fd38a0ce5..1b7e91285 100644 --- a/apps/openmw/mwsound/soundmanagerimp.cpp +++ b/apps/openmw/mwsound/soundmanagerimp.cpp @@ -612,7 +612,8 @@ namespace MWSound void SoundManager::stopSound(MWBase::SoundPtr sound) { - mOutput->stopSound(sound); + if (sound.get()) + mOutput->stopSound(sound); } void SoundManager::stopSound3D(const MWWorld::Ptr &ptr, const std::string& soundId) diff --git a/apps/openmw/mwsound/soundmanagerimp.hpp b/apps/openmw/mwsound/soundmanagerimp.hpp index c1d8eeb21..7058c55b6 100644 --- a/apps/openmw/mwsound/soundmanagerimp.hpp +++ b/apps/openmw/mwsound/soundmanagerimp.hpp @@ -201,6 +201,7 @@ namespace MWSound virtual void stopSound(MWBase::SoundPtr sound); ///< Stop the given sound from playing + /// @note no-op if \a sound is null virtual void stopSound3D(const MWWorld::Ptr &reference, const std::string& soundId); ///< Stop the given object from playing the given sound, From c60f4ba7bdd948b58842e82a4b31d29984359b74 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 5 Dec 2015 15:02:35 +0100 Subject: [PATCH 2/2] Make RigGeometry bone references case-insensitive (Fixes #3058) --- components/sceneutil/skeleton.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/sceneutil/skeleton.cpp b/components/sceneutil/skeleton.cpp index 83f7d6537..332dc3b07 100644 --- a/components/sceneutil/skeleton.cpp +++ b/components/sceneutil/skeleton.cpp @@ -3,6 +3,8 @@ #include #include +#include + #include namespace SceneUtil @@ -23,7 +25,7 @@ public: if (!bone) return; - mCache[bone->getName()] = std::make_pair(getNodePath(), bone); + mCache[Misc::StringUtils::lowerCase(bone->getName())] = std::make_pair(getNodePath(), bone); traverse(node); } @@ -59,7 +61,7 @@ Bone* Skeleton::getBone(const std::string &name) mBoneCacheInit = true; } - BoneCache::iterator found = mBoneCache.find(name); + BoneCache::iterator found = mBoneCache.find(Misc::StringUtils::lowerCase(name)); if (found == mBoneCache.end()) return NULL;