mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- NULL pointer checks in music_pseudo_mididevice.cpp to prevent crashes on startup if fmod fails to play a midi.
SVN r2927 (trunk)
This commit is contained in:
parent
b2548bf02a
commit
394a37421a
1 changed files with 3 additions and 2 deletions
|
@ -129,7 +129,7 @@ int PseudoMIDIDevice::Resume()
|
|||
{
|
||||
if (!Started)
|
||||
{
|
||||
if (Stream->Play(bLooping, 1))
|
||||
if (Stream && Stream->Play(bLooping, 1))
|
||||
{
|
||||
Started = true;
|
||||
return 0;
|
||||
|
@ -149,7 +149,8 @@ void PseudoMIDIDevice::Stop()
|
|||
{
|
||||
if (Started)
|
||||
{
|
||||
Stream->Stop();
|
||||
if (Stream)
|
||||
Stream->Stop();
|
||||
Started = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue