[markup] Check that str is not NULL
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
fb1ab46eea
commit
f824e383c9
|
@ -231,6 +231,9 @@ markup_parse(markup_parser_data_t *data, const char *str, ssize_t slen)
|
||||||
};
|
};
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
|
if(!a_strlen(str))
|
||||||
|
return false;
|
||||||
|
|
||||||
mkp_ctx = g_markup_parse_context_new(&parser, 0, data, NULL);
|
mkp_ctx = g_markup_parse_context_new(&parser, 0, data, NULL);
|
||||||
|
|
||||||
if(!g_markup_parse_context_parse(mkp_ctx, "<markup>", -1, &error)
|
if(!g_markup_parse_context_parse(mkp_ctx, "<markup>", -1, &error)
|
||||||
|
|
Loading…
Reference in New Issue