mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
[draw] Handle error on end of feeding into XML parser
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
a3b1b3be0b
commit
5447001254
1 changed files with 2 additions and 3 deletions
|
@ -288,15 +288,14 @@ draw_text_markup_expand(draw_parser_data_t *data,
|
|||
|
||||
mkp_ctx = g_markup_parse_context_new(&parser, 0, data, NULL);
|
||||
|
||||
if(!g_markup_parse_context_parse(mkp_ctx, text, len - 1, &error))
|
||||
if(!g_markup_parse_context_parse(mkp_ctx, text, len - 1, &error)
|
||||
|| !g_markup_parse_context_end_parse(mkp_ctx, &error))
|
||||
{
|
||||
warn("unable to parse text: %s\n", error->message);
|
||||
g_error_free(error);
|
||||
return false;
|
||||
}
|
||||
|
||||
g_markup_parse_context_end_parse(mkp_ctx, &error);
|
||||
|
||||
g_markup_parse_context_free(mkp_ctx);
|
||||
p_delete(&text);
|
||||
|
||||
|
|
Loading…
Reference in a new issue