1
0
Fork 0

(svn r2922) Fix crash with directmusic if no music files could be found to play

release/0.4.5
Darkvater 2005-09-08 12:22:47 +00:00
parent 991d5c6234
commit 73662f2fcb
1 changed files with 15 additions and 9 deletions

View File

@ -115,18 +115,24 @@ static void DMusicMidiStop(void)
{ {
seeking = false; seeking = false;
performance->Stop(NULL, NULL, 0, 0); if (performance != NULL) performance->Stop(NULL, NULL, 0, 0);
segment->SetParam(GUID_Unload, -1, 0, 0, performance); if (segment != NULL) {
segment->Release(); segment->SetParam(GUID_Unload, -1, 0, 0, performance);
segment = NULL; segment->Release();
segment = NULL;
}
performance->CloseDown(); if (performance != NULL) {
performance->Release(); performance->CloseDown();
performance = NULL; performance->Release();
performance = NULL;
}
loader->Release(); if (loader != NULL) {
loader = NULL; loader->Release();
loader = NULL;
}
proc.CoUninitialize(); proc.CoUninitialize();
} }