From ed84f7a0188d8c983db4a186b1240d955ee08705 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Tue, 26 May 2020 18:05:14 +0100 Subject: Amiga: avoid read from NULL pointer --- frontends/amiga/font_bullet.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'frontends/amiga/font_bullet.c') diff --git a/frontends/amiga/font_bullet.c b/frontends/amiga/font_bullet.c index 6283a1fbd..dec39a1f7 100644 --- a/frontends/amiga/font_bullet.c +++ b/frontends/amiga/font_bullet.c @@ -349,6 +349,11 @@ static nserror amiga_nsfont_split(const plot_font_style_t *fstyle, */ static struct ami_font_cache_node *ami_font_open(const char *font, bool critical) { + if(font == NULL) { + NSLOG(netsurf, INFO, "Requested NULL font"); + return NULL; + } + struct ami_font_cache_node *nodedata = ami_font_cache_locate(font); if(nodedata) return nodedata; -- cgit v1.2.3