1
0
Fork 0
forked from len0rd/rockbox

Add a bit more error checking to prevent possible crashes.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12880 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nicolas Pennequin 2007-03-21 21:38:55 +00:00
parent 5511611622
commit a83a94ea9c

View file

@ -252,14 +252,14 @@ static void browse_cuesheet(struct cuesheet *cue)
gui_synclist_set_nb_items(&lists, 2*cue->track_count);
gui_synclist_set_title(&lists, title, 0);
if (strcmp(id3->path, "No file!"))
if (id3 && *id3->path && strcmp(id3->path, "No file!"))
{
strncpy(cuepath, id3->path, MAX_PATH);
dot = strrchr(cuepath, '.');
strcpy(dot, ".cue");
}
if (id3->cuesheet_type && !strcmp(cue->path, cuepath))
if (id3 && id3->cuesheet_type && !strcmp(cue->path, cuepath))
{
gui_synclist_select_item(&lists,
2*cue_find_current_track(cue, id3->elapsed));