if(DM_Performance)
{
DM_Performance->Stop(NULL, NULL, 0, 0);
DM_Performance->CloseDown();
}
if(DM_Segment ) DM_Segment ->Release();
if(DM_Loader ) DM_Loader ->Release();
if(DM_Performance) DM_Performance->Release();
I load a midi and play it; everything works out just fine. The music plays, things run fine, everything''s good. Then when I shut down, the moment it hits the DM_Performance->Stop() it decides to crash (access violation).
This works fine in my other project and I can''t see what''s wrong, really. Any suggestions?
Problems with DirectMusic
Well, this sucks. I can''t figure this one out.
Neeever mind, found it. I was somehow calling my Deinitalise function twice when quitting (once when the user opts to quite and once when an SDL_QUIT is received) so it was being ->Release()''ed twice. The second time around, since it was invalid, it crashed.
I just added a DM_Segment = NULL; etc to everything and it ran fine.
I just added a DM_Segment = NULL; etc to everything and it ran fine.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement