summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
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;