Fix crash when destroying AudioStreamPlaybackOGGVorbis

This commit is contained in:
Evgeny Zuev 2017-09-01 17:48:46 +07:00
parent 7c76e0c8c3
commit 46f003c445

View file

@ -112,8 +112,8 @@ float AudioStreamPlaybackOGGVorbis::get_length() const {
AudioStreamPlaybackOGGVorbis::~AudioStreamPlaybackOGGVorbis() {
if (ogg_alloc.alloc_buffer) {
AudioServer::get_singleton()->audio_data_free(ogg_alloc.alloc_buffer);
stb_vorbis_close(ogg_stream);
AudioServer::get_singleton()->audio_data_free(ogg_alloc.alloc_buffer);
}
}