summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playback.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 2488de7abc..16407b2fbd 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -234,7 +234,8 @@ static volatile int track_ridx = 0; /* Track being decoded (A/C-) */
234static int track_widx = 0; /* Track being buffered (A) */ 234static int track_widx = 0; /* Track being buffered (A) */
235 235
236#define CUR_TI (&tracks[track_ridx]) /* Playing track info pointer (A/C-) */ 236#define CUR_TI (&tracks[track_ridx]) /* Playing track info pointer (A/C-) */
237static struct track_info *prev_ti; /* Pointer to the previous track played */ 237static struct track_info *prev_ti = NULL; /* Pointer to the previously played
238 track */
238 239
239/* Set by the audio thread when the current track information has updated 240/* Set by the audio thread when the current track information has updated
240 * and the WPS may need to update its cached information */ 241 * and the WPS may need to update its cached information */
@@ -2967,7 +2968,7 @@ static void audio_finalise_track_change(void)
2967 } 2968 }
2968 prevtrack_id3.path[0] = 0; 2969 prevtrack_id3.path[0] = 0;
2969 2970
2970 if (prev_ti->audio_hid < 0) 2971 if (prev_ti && prev_ti->audio_hid < 0)
2971 { 2972 {
2972 /* No audio left so we clear all the track info. */ 2973 /* No audio left so we clear all the track info. */
2973 clear_track_info(prev_ti); 2974 clear_track_info(prev_ti);