mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Apply Boolsheet's GME leak patch.
This commit is contained in:
@@ -46,11 +46,19 @@ GmeDecoder::GmeDecoder(Data *data, const std::string &ext, int bufferSize)
|
|||||||
|
|
||||||
num_tracks = gme_track_count(emu);
|
num_tracks = gme_track_count(emu);
|
||||||
|
|
||||||
if (num_tracks <= 0)
|
try
|
||||||
throw love::Exception("Game music file has no tracks");
|
{
|
||||||
|
if (num_tracks <= 0)
|
||||||
|
throw love::Exception("Game music file has no tracks");
|
||||||
|
|
||||||
if (gme_start_track(emu, cur_track) != 0)
|
if (gme_start_track(emu, cur_track) != 0)
|
||||||
throw love::Exception("Could not start game music playback");
|
throw love::Exception("Could not start game music playback");
|
||||||
|
}
|
||||||
|
catch (love::Exception &)
|
||||||
|
{
|
||||||
|
gme_delete(emu);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GmeDecoder::~GmeDecoder()
|
GmeDecoder::~GmeDecoder()
|
||||||
|
|||||||
Reference in New Issue
Block a user