This is more in-line with free() behaviour. Signed-off-by: Vladimir Serbinenko <phco...@gmail.com> --- include/grub/unicode.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/grub/unicode.h b/include/grub/unicode.h index 9360b0b97..9a3a1d02a 100644 --- a/include/grub/unicode.h +++ b/include/grub/unicode.h @@ -281,6 +281,8 @@ grub_unicode_get_comb (const struct grub_unicode_glyph *in) static inline void grub_unicode_destroy_glyph (struct grub_unicode_glyph *glyph) { + if (!glyph) + return; if (glyph->ncomb > ARRAY_SIZE (glyph->combining_inline)) grub_free (glyph->combining_ptr); glyph->ncomb = 0; -- 2.39.2 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel