summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-06-10 10:46:12 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-06-10 10:46:12 +0000
commit5ee0b7e9d9429a3beacb65ce85b916f8b543e8f7 (patch)
tree0ca9caa79611e6c07689aa57dcae7cd910bdb746 /firmware
parentec2ab7e85a52ae4aaa38387a47fec8966540ad2e (diff)
downloadrockbox-5ee0b7e9d9429a3beacb65ce85b916f8b543e8f7.tar.gz
rockbox-5ee0b7e9d9429a3beacb65ce85b916f8b543e8f7.zip
mpeg_stop now calls close only if the file handle is valid
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@930 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/mpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 00486e6706..394d1821db 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -339,7 +339,8 @@ static void mpeg_thread(void)
/* Stop the current stream */
playing = false;
filling = false;
- close(mpeg_file);
+ if(mpeg_file >= 0)
+ close(mpeg_file);
mpeg_file = -1;
stop_dma();
break;