From ea14905c994fa7e0df53f8f6989e8c65c37606d5 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 11 Jul 2024 16:23:33 +0100 Subject: [PATCH] [Fix] Do not crash if symbol is missing in the metric --- src/lua/lua_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 61aac63f2..21e24fc45 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -4716,7 +4716,7 @@ lua_push_symbol_result(lua_State *L, lua_settable(L, -3); /* Dynamic weight of the symbol */ - if (s->sym->score != 0) { + if (s->sym != NULL && s->sym->score != 0) { lua_pushstring(L, "weight"); lua_pushnumber(L, s->score / s->sym->score); } -- 2.39.5