summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/wps_parser.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index f6b21781a2..50020dada6 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -1319,9 +1319,6 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr)
1319 print_debug_info(data, fail, line); 1319 print_debug_info(data, fail, line);
1320#endif 1320#endif
1321 1321
1322 if (fail)
1323 wps_reset(data);
1324
1325 return (fail == 0); 1322 return (fail == 0);
1326} 1323}
1327 1324
@@ -1564,8 +1561,10 @@ bool wps_data_load(struct wps_data *wps_data,
1564 wps_buffer = skip_utf8_bom(wps_buffer); 1561 wps_buffer = skip_utf8_bom(wps_buffer);
1565 1562
1566 /* parse the WPS source */ 1563 /* parse the WPS source */
1567 if (!wps_parse(wps_data, wps_buffer)) 1564 if (!wps_parse(wps_data, wps_buffer)) {
1565 wps_reset(wps_data);
1568 return false; 1566 return false;
1567 }
1569 1568
1570 wps_data->wps_loaded = true; 1569 wps_data->wps_loaded = true;
1571 1570
@@ -1579,8 +1578,10 @@ bool wps_data_load(struct wps_data *wps_data,
1579 bmpdir[bmpdirlen] = 0; 1578 bmpdir[bmpdirlen] = 0;
1580 1579
1581 /* load the bitmaps that were found by the parsing */ 1580 /* load the bitmaps that were found by the parsing */
1582 if (!load_wps_bitmaps(wps_data, bmpdir)) 1581 if (!load_wps_bitmaps(wps_data, bmpdir)) {
1582 wps_reset(wps_data);
1583 return false; 1583 return false;
1584 }
1584#endif 1585#endif
1585 return true; 1586 return true;
1586 } 1587 }