From 7148ea2a99fdacfdca329092b0782af880e91785 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 13 May 2019 20:51:58 -0400 Subject: [PATCH] Fix a possible null pointer issue --- libctru/include/3ds/font.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libctru/include/3ds/font.h b/libctru/include/3ds/font.h index c546782..a60fbad 100644 --- a/libctru/include/3ds/font.h +++ b/libctru/include/3ds/font.h @@ -168,6 +168,8 @@ void fontFixPointers(CFNT_s* font); static inline CFNT_s* fontGetSystemFont(void) { extern CFNT_s* g_sharedFont; + if (!g_sharedFont) + fontEnsureMapped(); return g_sharedFont; }