Skip to content

Commit 5e7eb3d

Browse files
authored
Add nil check in wire_expression2_CallHook (#3555)
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
1 parent b84364c commit 5e7eb3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • lua/entities/gmod_wire_expression2/core

lua/entities/gmod_wire_expression2/core/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function registerType(name, id, def, input_serialize, output_serialize, type_che
6666
end
6767

6868
function wire_expression2_CallHook(hookname, ...)
69-
if not wire_expression_callbacks[hookname] then return end
69+
if not wire_expression_callbacks or not wire_expression_callbacks[hookname] then return end
7070
local ret_array = {}
7171
local errors = {}
7272
local ok, ret

0 commit comments

Comments
 (0)