draw: stop leaking image on double parsing
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
b63e10b7e8
commit
0fddca87c3
|
@ -223,6 +223,8 @@ draw_markup_on_element(markup_parser_data_t *p, const char *elem,
|
||||||
*values, &data->bg_color);
|
*values, &data->bg_color);
|
||||||
break;
|
break;
|
||||||
case A_TK_IMAGE:
|
case A_TK_IMAGE:
|
||||||
|
if(data->bg_image)
|
||||||
|
draw_image_delete(&data->bg_image);
|
||||||
data->bg_image = draw_image_new(*values);
|
data->bg_image = draw_image_new(*values);
|
||||||
break;
|
break;
|
||||||
case A_TK_ALIGN:
|
case A_TK_ALIGN:
|
||||||
|
|
Loading…
Reference in New Issue