list-skinned.c check label pointer for validity

Change-Id: I993ff4a2d5d1c46bad46aae7f46fa4996e67481a
This commit is contained in:
William Wilgus 2021-08-02 22:46:17 -04:00 committed by William Wilgus
parent 382b52b120
commit 429eedf49e

View file

@ -197,6 +197,9 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
wps.data = listcfg[screen]->data;
display_lines = skinlist_get_line_count(screen, list);
label = (char *)SKINOFFSETTOPTR(get_skin_buffer(wps.data), listcfg[screen]->label);
if (!label)
return false;
display->set_viewport(parent);
display->clear_viewport();
current_item = list->selected_item;