From 59ba832e3aefa3398ab4a509ef139aa9e7926a34 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 29 Mar 2009 12:42:39 +0000 Subject: Fix potential NULL pointer access. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20566 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps-common.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index a90b562c02..f32b002f69 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -1880,12 +1880,14 @@ bool gui_wps_redraw(struct gui_wps *gwps, struct wps_data *data = gwps->data; struct screen *display = gwps->display; struct wps_state *state = gwps->state; + + if (!data || !state || !display) + return false; + struct mp3entry *id3 = state->id3; - if(!data || !state || !display || !id3) - { + if (!id3) return false; - } int v, line, i, subline_idx; unsigned flags; -- cgit v1.2.3