diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-30 17:11:21 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-30 17:11:21 +0000 |
commit | 9ce3221740786fc52d2e127e45f6e390522d9763 (patch) | |
tree | ed04b6c62266df8bedcaed1595bf3c428031feec | |
parent | da501ee329a76d8db065cc1a84c5ce93c98c8737 (diff) | |
download | rockbox-9ce3221740786fc52d2e127e45f6e390522d9763.tar.gz rockbox-9ce3221740786fc52d2e127e45f6e390522d9763.zip |
Better protection against NULL pointers in id3 tags
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1272 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/wps.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/wps.c b/apps/wps.c index 2779af7a5d..25ce735066 100644 --- a/apps/wps.c +++ b/apps/wps.c | |||
@@ -126,17 +126,17 @@ void wps_show(void) | |||
126 | if ( ( id3->length != lastlength ) || | 126 | if ( ( id3->length != lastlength ) || |
127 | ( id3->filesize != lastsize ) || | 127 | ( id3->filesize != lastsize ) || |
128 | ( id3->bitrate != lastrate ) || | 128 | ( id3->bitrate != lastrate ) || |
129 | ( id3->artist[0] != lastartist ) || | 129 | ( (id3->artist?id3->artist[0]:0) != lastartist ) || |
130 | ( id3->album[0] != lastalbum ) || | 130 | ( (id3->album?id3->album[0]:0) != lastalbum ) || |
131 | ( id3->title[0] != lasttitle ) ) | 131 | ( (id3->title?id3->title[0]:0) != lasttitle ) ) |
132 | { | 132 | { |
133 | draw_screen(id3); | 133 | draw_screen(id3); |
134 | lastlength = id3->length; | 134 | lastlength = id3->length; |
135 | lastsize = id3->filesize; | 135 | lastsize = id3->filesize; |
136 | lastrate = id3->bitrate; | 136 | lastrate = id3->bitrate; |
137 | lastartist = id3->artist[0]; | 137 | lastartist = id3->artist?id3->artist[0]:0; |
138 | lastalbum = id3->album[0]; | 138 | lastalbum = id3->album?id3->album[0]:0; |
139 | lasttitle = id3->title[0]; | 139 | lasttitle = id3->title?id3->title[0]:0; |
140 | } | 140 | } |
141 | 141 | ||
142 | if (playing) | 142 | if (playing) |