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:
parent
5511611622
commit
a83a94ea9c
1 changed files with 2 additions and 2 deletions
|
@ -252,14 +252,14 @@ static void browse_cuesheet(struct cuesheet *cue)
|
||||||
gui_synclist_set_nb_items(&lists, 2*cue->track_count);
|
gui_synclist_set_nb_items(&lists, 2*cue->track_count);
|
||||||
gui_synclist_set_title(&lists, title, 0);
|
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);
|
strncpy(cuepath, id3->path, MAX_PATH);
|
||||||
dot = strrchr(cuepath, '.');
|
dot = strrchr(cuepath, '.');
|
||||||
strcpy(dot, ".cue");
|
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,
|
gui_synclist_select_item(&lists,
|
||||||
2*cue_find_current_track(cue, id3->elapsed));
|
2*cue_find_current_track(cue, id3->elapsed));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue