summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-28 15:14:50 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-28 17:53:03 -0400
commit8c8284bbe642318a8c661a834456841307431a7b (patch)
treed82b9c5a87af210196a485e30db1f385cc9152fd
parentc85d8e286549589a38e33d57e2a92d6c99ce5edf (diff)
Fix statusbar display regression from a605cdf700
Change-Id: I4d02ac28e05080458eea6e3f52498321199ecbd3
-rw-r--r--apps/gui/skin_engine/skin_parser.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index b64bfc143c..8e59c2c2b0 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -147,7 +147,6 @@ static void add_to_ll_chain(OFFSETTYPE(struct skin_token_list *) *listoffset,
void *skin_find_item(const char *label, enum skin_find_what what,
struct wps_data *data)
{
- const char *itemlabel = NULL;
char *databuf = get_skin_buffer(data);
union {
struct skin_token_list *linkedlist;
@@ -183,11 +182,10 @@ void *skin_find_item(const char *label, enum skin_find_what what,
{
bool skip = false;
struct wps_token *token = NULL;
- itemlabel = NULL;
+ const char *itemlabel = NULL;
if (!isvplist)
token = SKINOFFSETTOPTR(databuf, list.linkedlist->token);
- if (token)
- switch (what)
+ switch (what)
{
case SKIN_FIND_UIVP:
case SKIN_FIND_VP:
@@ -201,25 +199,27 @@ void *skin_find_item(const char *label, enum skin_find_what what,
(what==SKIN_FIND_UIVP));
break;
case SKIN_FIND_IMAGE:
+ if (!token) break;
ret = SKINOFFSETTOPTR(databuf, token->value.data);
if (!ret) break;
itemlabel = SKINOFFSETTOPTR(databuf, ((struct gui_img *)ret)->label);
break;
#ifdef HAVE_TOUCHSCREEN
case SKIN_FIND_TOUCHREGION:
- if (!ret) break;
+ if (!token) break;
ret = SKINOFFSETTOPTR(databuf, token->value.data);
+ if (!ret) break;
itemlabel = SKINOFFSETTOPTR(databuf, ((struct touchregion *)ret)->label);
break;
#endif
#ifdef HAVE_SKIN_VARIABLES
case SKIN_VARIABLE:
+ if (!token) break;
ret = SKINOFFSETTOPTR(databuf, token->value.data);
if (!ret) break;
itemlabel = SKINOFFSETTOPTR(databuf, ((struct skin_var *)ret)->label);
break;
#endif
-
}
if (!skip && itemlabel && !strcmp(itemlabel, label))
{