From d8fab76cd658439503a5a1882aed975fcbf4f3d2 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Mon, 27 Sep 2010 21:58:15 +0200 Subject: fixed crash in shn plugin when seeking backward --- plugins/shn/shn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/shn') diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c index 0cecfa7e..1d44f6e8 100644 --- a/plugins/shn/shn.c +++ b/plugins/shn/shn.c @@ -401,10 +401,6 @@ shn_free_decoder (shn_fileinfo_t *info) { info->shnfile->decode_state->writefub = NULL; } } - if (info->shnfile) { - shn_unload(info->shnfile); - info->shnfile = NULL; - } } } @@ -412,6 +408,10 @@ void shn_free (DB_fileinfo_t *_info) { shn_fileinfo_t *info = (shn_fileinfo_t *)_info; shn_free_decoder (info); + if (info->shnfile) { + shn_unload(info->shnfile); + info->shnfile = NULL; + } if (info->buffer) { free(info->buffer); info->buffer = NULL; -- cgit v1.2.3