From 223ba4b2cde7c9a2e14e98f45c123a98e1224f9a Mon Sep 17 00:00:00 2001 From: learman Date: Thu, 23 Jul 2009 15:20:18 +0000 Subject: [PATCH] Fix possible null pointer dereference in cuesheet handling. Causes problems in the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22015 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index c4b0be1eb..da70f0e45 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -355,7 +355,7 @@ bool gui_wps_update(struct gui_wps *gwps) { struct mp3entry *id3 = gwps->state->id3; bool retval; - bool cuesheet_update = cuesheet_subtrack_changed(id3); + bool cuesheet_update = (id3 != NULL ? cuesheet_subtrack_changed(id3) : false); gwps->state->do_full_update = cuesheet_update || gwps->state->do_full_update; retval = gui_wps_redraw(gwps, 0, gwps->state->do_full_update ? -- 2.11.4.GIT