[markup] Check that str is not NULL

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-05-11 16:23:05 +02:00
parent fb1ab46eea
commit f824e383c9
1 changed files with 3 additions and 0 deletions

View File

@ -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)