mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-04-21 21:52:04 +02:00
Close the SDL_RWops when we're done with it when loading midi audio.
This commit is contained in:
parent
891b1fd9f7
commit
181192cb04
1 changed files with 3 additions and 9 deletions
|
@ -631,15 +631,9 @@ struct MidiSource : ALDataSource, MidiReadHandler
|
|||
throw Exception(Exception::MKXPError, "Reading midi data failed");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
readMidi(this, data);
|
||||
}
|
||||
catch (const Exception &)
|
||||
{
|
||||
SDL_RWclose(&ops);
|
||||
throw;
|
||||
}
|
||||
SDL_RWclose(&ops);
|
||||
|
||||
readMidi(this, data);
|
||||
|
||||
synth = shState->midiState().allocateSynth();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue