summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r--apps/gui/skin_engine/skin_parser.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index d6091f9441..97f2d9a5f7 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1424,12 +1424,12 @@ static bool check_feature_tag(const int type)
1424 } 1424 }
1425} 1425}
1426 1426
1427/* 1427/* This is used to free any buflib allocations before the rest of
1428 * initial setup of wps_data; does reset everything 1428 * wps_data is reset.
1429 * except fields which need to survive, i.e. 1429 * The call to this in settings_apply_skins() is the last chance to do
1430 * 1430 * any core_free()'s before wps_data is trashed and those handles lost
1431 **/ 1431 */
1432static void skin_data_reset(struct wps_data *wps_data) 1432void skin_data_free_buflib_allocs(struct wps_data *wps_data)
1433{ 1433{
1434#ifdef HAVE_LCD_BITMAP 1434#ifdef HAVE_LCD_BITMAP
1435#ifndef __PCTOOL__ 1435#ifndef __PCTOOL__
@@ -1442,6 +1442,18 @@ static void skin_data_reset(struct wps_data *wps_data)
1442 list = list->next; 1442 list = list->next;
1443 } 1443 }
1444#endif 1444#endif
1445#endif
1446}
1447
1448/*
1449 * initial setup of wps_data; does reset everything
1450 * except fields which need to survive, i.e.
1451 * Also called if the load fails
1452 **/
1453static void skin_data_reset(struct wps_data *wps_data)
1454{
1455 skin_data_free_buflib_allocs(wps_data);
1456#ifdef HAVE_LCD_BITMAP
1445 wps_data->images = NULL; 1457 wps_data->images = NULL;
1446#endif 1458#endif
1447 wps_data->tree = NULL; 1459 wps_data->tree = NULL;