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.zip rockbox-9ce3221740786fc52d2e127e45f6e390522d9763.tar.gz rockbox-9ce3221740786fc52d2e127e45f6e390522d9763.tar.bz2 rockbox-9ce3221740786fc52d2e127e45f6e390522d9763.tar.xz | |
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
@@ -126,17 +126,17 @@ void wps_show(void) if ( ( id3->length != lastlength ) || ( id3->filesize != lastsize ) || ( id3->bitrate != lastrate ) || - ( id3->artist[0] != lastartist ) || - ( id3->album[0] != lastalbum ) || - ( id3->title[0] != lasttitle ) ) + ( (id3->artist?id3->artist[0]:0) != lastartist ) || + ( (id3->album?id3->album[0]:0) != lastalbum ) || + ( (id3->title?id3->title[0]:0) != lasttitle ) ) { draw_screen(id3); lastlength = id3->length; lastsize = id3->filesize; lastrate = id3->bitrate; - lastartist = id3->artist[0]; - lastalbum = id3->album[0]; - lasttitle = id3->title[0]; + lastartist = id3->artist?id3->artist[0]:0; + lastalbum = id3->album?id3->album[0]:0; + lasttitle = id3->title?id3->title[0]:0; } if (playing) |