diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2008-05-15 23:02:22 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2008-05-15 23:02:22 +0000 |
commit | 16c8f060e6ec444f9af2d41f73543f2e92a016ca (patch) | |
tree | af89c39f6427d66301e25249f9f3ba664096ad49 | |
parent | 909811286919421bd3b22e5820118a821cfe6952 (diff) | |
download | rockbox-16c8f060e6ec444f9af2d41f73543f2e92a016ca.tar.gz rockbox-16c8f060e6ec444f9af2d41f73543f2e92a016ca.zip |
Protect scrobbler_shutdown against multiple invocations, preventing double unregister of ata_idle callback. Probable fix for FS#8993 - Freeze on shutting down.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17533 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/scrobbler.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/scrobbler.c b/apps/scrobbler.c index f05bbdb1f4..c109439263 100644 --- a/apps/scrobbler.c +++ b/apps/scrobbler.c | |||
@@ -251,7 +251,10 @@ void scrobbler_shutdown(void) | |||
251 | { | 251 | { |
252 | #ifndef SIMULATOR | 252 | #ifndef SIMULATOR |
253 | if (scrobbler_ata_callback) | 253 | if (scrobbler_ata_callback) |
254 | { | ||
254 | unregister_ata_idle_func(scrobbler_flush_callback, false); | 255 | unregister_ata_idle_func(scrobbler_flush_callback, false); |
256 | scrobbler_ata_callback = false; | ||
257 | } | ||
255 | #endif | 258 | #endif |
256 | 259 | ||
257 | scrobbler_flush_cache(); | 260 | scrobbler_flush_cache(); |