Skip to content

Commit

Permalink
Fixed crash with Half-Life game dll
Browse files Browse the repository at this point in the history
  • Loading branch information
theAsmodai committed Jul 6, 2017
1 parent 60a9c37 commit daea1f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metamod/src/dllapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void compile_newdllfunc_callbacks()
jitdata.post_table_offset = offsetof(MPlugin, m_newapi_post_table);

for (auto& cd : g_newdllfunc_cdata) {
jitdata.pfn_original = *(size_t *)(size_t(g_GameDLL.funcs.newapi_table) + cd.offset);
jitdata.pfn_original = g_GameDLL.funcs.newapi_table ? *(size_t *)(size_t(g_GameDLL.funcs.newapi_table) + cd.offset) : 0;
jitdata.args_count = cd.args_count;
jitdata.has_ret = cd.has_ret;
jitdata.has_varargs = cd.has_varargs;
Expand Down

0 comments on commit daea1f8

Please sign in to comment.