1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-18 18:40:06 +00:00

See if we have an instance of mData before trying to use it otherwise we get a crash when starting with --nosound

This commit is contained in:
Jan-Peter Nilsson 2011-01-01 22:33:08 +01:00
parent f3ae1ea737
commit d38f2f0a00

View File

@ -364,10 +364,14 @@ namespace MWSound
bool SoundManager::isMusicPlaying() bool SoundManager::isMusicPlaying()
{ {
bool test = mData->music->isPlaying(); bool test = false;
return test; if(mData && mData->music)
} {
test = mData->music->isPlaying();
}
return test;
}
SoundManager::SoundImpl SoundManager::getMData() SoundManager::SoundImpl SoundManager::getMData()
{ {