From 80bb2819dadc83584e784a7183f31e179d2a4317 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 30 Aug 2005 20:52:24 +0000 Subject: Archos: Removed NULL pointer accesses when changing tracks git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7431 a1c6a512-1295-4272-9138-f99709370657 --- firmware/mpeg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'firmware') diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 394d6983b6..221c403b49 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -834,10 +834,9 @@ static void transfer_end(unsigned char** ppbuf, int* psize) space_until_end_of_buffer); /* several tracks loaded? */ - if (num_tracks_in_memory() > 1) + track = get_trackdata(track_offset); + if(track) { - track = get_trackdata(track_offset); - /* will we move across the track boundary? */ if (( audiobuf_read < track->mempos ) && ((audiobuf_read+last_dma_chunk_size) > -- cgit v1.2.3