From de16a5972244be5b090093f191c06424744673ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ni=C3=B1o=20D=C3=ADaz?= Date: Wed, 14 Aug 2024 00:45:07 +0100 Subject: [PATCH] library: Fixes to RichText module --- source/NERichText.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/NERichText.c b/source/NERichText.c index 269321d..c2ef43d 100644 --- a/source/NERichText.c +++ b/source/NERichText.c @@ -324,6 +324,8 @@ int NE_RichTextBitmapSet(u32 slot, const void *texture_buffer, free(info->palette_buffer); } + info->has_to_free_buffers = false; + info->texture_buffer = (void *)texture_buffer; info->texture_width = texture_width; info->texture_height = texture_height; @@ -414,7 +416,7 @@ int NE_RichTextRenderMaterial(u32 slot, const char *str, NE_Material **mat, if (!info->active) return 0; - void *out_texture; + void *out_texture = NULL; size_t out_width, out_height; dsf_error err = DSF_StringRenderToTexture(info->handle, str, info->fmt, info->texture_buffer,