summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-08-30 20:52:24 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-08-30 20:52:24 +0000
commit80bb2819dadc83584e784a7183f31e179d2a4317 (patch)
tree6e85dc8b1978f3e65cbfb32db241a5475d5e5601 /firmware
parent517b4b7c1ec83f46e204c2c381fe3ae632a4c1d2 (diff)
downloadrockbox-80bb2819dadc83584e784a7183f31e179d2a4317.tar.gz
rockbox-80bb2819dadc83584e784a7183f31e179d2a4317.zip
Archos: Removed NULL pointer accesses when changing tracks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7431 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/mpeg.c5
1 files changed, 2 insertions, 3 deletions
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) >