Skip to content

Commit

Permalink
Added get_int_64 null handle checking
Browse files Browse the repository at this point in the history
  • Loading branch information
DMD authored and DMD committed Sep 2, 2016
1 parent 9a0d7cf commit 03317fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion TemplePlus/gamesystems/objects/objsystem_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ static class ObjSystemHooks : public TempleFix {
});

// obj_get_int64
replaceFunction<int64_t(objHndl, obj_f)>(0x1009e2e0, [](objHndl handle, obj_f field) {
replaceFunction<int64_t(objHndl, obj_f)>(0x1009e2e0, [](objHndl handle, obj_f field) ->int64_t{
if (!handle) {
return 0i64;
}
return GetObj(handle)->GetInt64(field);
});

Expand Down

0 comments on commit 03317fe

Please sign in to comment.