From 06d51630c19b4d5d4933bb03d61f2d69cbb5454f Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Thu, 23 Jul 2009 15:20:18 +0000 Subject: 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(-) (limited to 'apps') diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index c4b0be1eb1..da70f0e451 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 ? -- cgit v1.2.3