Amiga: avoid read from NULL pointer

This commit is contained in:
Chris Young 2020-05-26 18:05:14 +01:00
parent 68f1b41bf0
commit ed84f7a018
1 changed files with 5 additions and 0 deletions

View File

@ -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;