mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 09:23:51 +00:00
Don't attempt to open an empty texture
This commit is contained in:
parent
d97dda05c9
commit
a1fa1b2b2e
1 changed files with 4 additions and 2 deletions
|
@ -1550,11 +1550,13 @@ void SkyManager::setWeather(const WeatherResult& weather)
|
||||||
{
|
{
|
||||||
mNextClouds = weather.mNextCloudTexture;
|
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,
|
mCloudUpdater2->setTexture(mSceneManager->getTextureManager()->getTexture2D(texture,
|
||||||
osg::Texture::REPEAT, osg::Texture::REPEAT));
|
osg::Texture::REPEAT, osg::Texture::REPEAT));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCloudBlendFactor != weather.mCloudBlendFactor)
|
if (mCloudBlendFactor != weather.mCloudBlendFactor)
|
||||||
|
|
Loading…
Reference in a new issue