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

This commit is contained in:
Darkvater
2005-09-08 12:22:47 +00:00
parent 6145b99c22
commit 91c217867f

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);
if (segment != NULL) {
segment->SetParam(GUID_Unload, -1, 0, 0, performance); segment->SetParam(GUID_Unload, -1, 0, 0, performance);
segment->Release(); segment->Release();
segment = NULL; segment = NULL;
}
if (performance != NULL) {
performance->CloseDown(); performance->CloseDown();
performance->Release(); performance->Release();
performance = NULL; performance = NULL;
}
if (loader != NULL) {
loader->Release(); loader->Release();
loader = NULL; loader = NULL;
}
proc.CoUninitialize(); proc.CoUninitialize();
} }