summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2008-05-15 23:02:22 +0000
committerBertrik Sikken <bertrik@sikken.nl>2008-05-15 23:02:22 +0000
commit16c8f060e6ec444f9af2d41f73543f2e92a016ca (patch)
treeaf89c39f6427d66301e25249f9f3ba664096ad49
parent909811286919421bd3b22e5820118a821cfe6952 (diff)
downloadrockbox-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.c3
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();