blob: 1c26e87807ea08f1c5dadd52745a5c3b12085098 [file] [log] [blame]
From 4ed8f5ee5af8c06ee2ba1fa9017402c9526fa406 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 24 Feb 2020 09:18:13 +0000
Subject: [PATCH] check incoming metric for nullptr
https://github.com/caolanm/libwmf/issues/2
---
src/font.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/font.c b/src/font.c
index 6b88499..5b45355 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1683,7 +1683,10 @@ static FT_Face ipa_font_face_open (wmfAPI* API,char* ps_name,char* glyphs,char*
}
#ifdef _WIN32
- metrics = remap_font_file_name (API,metrics);
+ if (metrics)
+ {
+ metrics = remap_font_file_name (API,metrics);
+ }
#endif
if (metrics)
{ if (stat (metrics,&stat_buf))