summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2005-12-22 21:42:00 +0000
committerMagnus Holmgren <magnushol@gmail.com>2005-12-22 21:42:00 +0000
commit917f2c1804c1c581c09fdd1a6cd219298da54964 (patch)
tree822ae744ce7772d21ecb67acd4de52eb3333dee7 /apps/playback.c
parentb1a230353e81863189e0be1603c1ee6fa653485d (diff)
Simulator fixes: id3 string pointers can be null.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8282 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/playback.c b/apps/playback.c
index dda3ea7bdd..1e9bca6c36 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1027,9 +1027,12 @@ static bool read_next_metadata(void)
status = get_metadata(&tracks[next_track],fd,trackname,v1first);
/* Preload the glyphs in the tags */
if (status) {
- lcd_getstringsize(tracks[next_track].id3.title, NULL, NULL);
- lcd_getstringsize(tracks[next_track].id3.artist, NULL, NULL);
- lcd_getstringsize(tracks[next_track].id3.album, NULL, NULL);
+ if (tracks[next_track].id3.title)
+ lcd_getstringsize(tracks[next_track].id3.title, NULL, NULL);
+ if (tracks[next_track].id3.artist)
+ lcd_getstringsize(tracks[next_track].id3.artist, NULL, NULL);
+ if (tracks[next_track].id3.album)
+ lcd_getstringsize(tracks[next_track].id3.album, NULL, NULL);
}
track_changed = true;
close(fd);