- 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:
Braden Obrzut 2010-10-09 04:37:31 +00:00
parent b2548bf02a
commit 394a37421a

View file

@ -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;
}
}