From c8e23252ef05655cfa55bc02bc1ce4b9e6f33458 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Thu, 6 Feb 2014 17:12:01 +0100 Subject: streamer: reduce RC chance in streamer_abort_files --- streamer.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'streamer.c') diff --git a/streamer.c b/streamer.c index 9b28450a..6df3c66a 100644 --- a/streamer.c +++ b/streamer.c @@ -186,14 +186,17 @@ streamer_unlock (void) { static void streamer_abort_files (void) { trace ("\033[0;33mstreamer_abort_files\033[37;0m\n"); - if (fileinfo_file) { - deadbeef->fabort (fileinfo_file); + DB_FILE *file = fileinfo_file; + DB_FILE *newfile = new_fileinfo_file; + DB_FILE *strfile = streamer_file; + if (file) { + deadbeef->fabort (file); } - if (new_fileinfo_file) { - deadbeef->fabort (new_fileinfo_file); + if (newfile) { + deadbeef->fabort (newfile); } - if (streamer_file) { - deadbeef->fabort (streamer_file); + if (strfile) { + deadbeef->fabort (strfile); } } -- cgit v1.2.3