From 6b14ba0c42173631db3be947c4a67980f950ecf1 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Wed, 11 Mar 2026 23:29:13 +0300 Subject: [PATCH] Add `nil` check in `wire_expression2_CallHook` Without this, attempting to call `E2Lib.replace_function` in `E2Lib_PreLoadExtensions` will result in an error, although this is the most reliable way to modify E2Lib --- lua/entities/gmod_wire_expression2/core/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_expression2/core/init.lua b/lua/entities/gmod_wire_expression2/core/init.lua index ed5217d457..01b703489d 100644 --- a/lua/entities/gmod_wire_expression2/core/init.lua +++ b/lua/entities/gmod_wire_expression2/core/init.lua @@ -66,7 +66,7 @@ function registerType(name, id, def, input_serialize, output_serialize, type_che end function wire_expression2_CallHook(hookname, ...) - if not wire_expression_callbacks[hookname] then return end + if not wire_expression_callbacks or not wire_expression_callbacks[hookname] then return end local ret_array = {} local errors = {} local ok, ret