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:
parent
f3ae1ea737
commit
d38f2f0a00
@ -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()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user