summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2020-05-26 18:05:14 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2020-05-26 18:05:14 +0100
commited84f7a0188d8c983db4a186b1240d955ee08705 (patch)
treeaab371022e957dd251c724f056b79e4bef98ca19
parent68f1b41bf0c62b79a95c4547194bf7bde535de47 (diff)
downloadnetsurf-ed84f7a0188d8c983db4a186b1240d955ee08705.tar.gz
netsurf-ed84f7a0188d8c983db4a186b1240d955ee08705.tar.bz2
Amiga: avoid read from NULL pointer
-rw-r--r--frontends/amiga/font_bullet.c5
1 files changed, 5 insertions, 0 deletions
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;