From bb5150445a1259c5e3a8e510aac635e8c6a6433e Mon Sep 17 00:00:00 2001 From: SHIRAKATA Kentaro Date: Thu, 10 Feb 2022 05:24:34 +0900 Subject: [PATCH] Check the return value of nhl_init() on com_pager_core() nhl_init() can return NULL. --- src/questpgr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/questpgr.c b/src/questpgr.c index d04f7768a..11c540599 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -438,6 +438,11 @@ com_pager_core(const char *section, const char *msgid, boolean showerror) return FALSE; L = nhl_init(); + if (!L) { + if (showerror) + impossible("com_pager: nhl_init() failed"); + goto compagerdone; + } if (!nhl_loadlua(L, QTEXT_FILE)) { if (showerror)