From d97dda05c9533b751caa0e33b2509d50a6c35290 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 28 Nov 2015 05:55:36 +0100 Subject: [PATCH 1/2] Don't attempt to play unset weather sounds --- apps/openmw/mwworld/weather.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwworld/weather.cpp b/apps/openmw/mwworld/weather.cpp index 6d9a85ada4..a5e4db5476 100644 --- a/apps/openmw/mwworld/weather.cpp +++ b/apps/openmw/mwworld/weather.cpp @@ -158,6 +158,9 @@ Weather::Weather(const std::string& name, else mAmbientLoopSoundID = fallback.getFallbackString("Weather_" + name + "_Ambient_Loop_Sound_ID"); + if (Misc::StringUtils::ciEqual(mAmbientLoopSoundID, "None")) + mAmbientLoopSoundID.clear(); + /* Unhandled: Rain Diameter=600 ? From a1fa1b2b2ec5f8d5366b4c7f72115eee84d0dbab Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 28 Nov 2015 06:00:18 +0100 Subject: [PATCH 2/2] Don't attempt to open an empty texture --- apps/openmw/mwrender/sky.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp index 66253f70d5..68ee17e6b3 100644 --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -1550,11 +1550,13 @@ void SkyManager::setWeather(const WeatherResult& weather) { mNextClouds = weather.mNextCloudTexture; - std::string texture = Misc::ResourceHelpers::correctTexturePath(mNextClouds, mSceneManager->getVFS()); + if (!mNextClouds.empty()) + { + std::string texture = Misc::ResourceHelpers::correctTexturePath(mNextClouds, mSceneManager->getVFS()); - if (!texture.empty()) mCloudUpdater2->setTexture(mSceneManager->getTextureManager()->getTexture2D(texture, osg::Texture::REPEAT, osg::Texture::REPEAT)); + } } if (mCloudBlendFactor != weather.mCloudBlendFactor)