summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-03-21 21:38:55 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-03-21 21:38:55 +0000
commita83a94ea9c8ca260ed8422d08df0c61f93e7ecf6 (patch)
tree80747be582bc19264a5892b6fd9516ca711a7bb6
parent551161162214ef62127bfff1398702d01bc02fa1 (diff)
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
-rw-r--r--apps/cuesheet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index 2f36ff0212..b05ff2493b 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -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));