From 03317fe2e49f93159c1d6d3de8b5374b3a34ce59 Mon Sep 17 00:00:00 2001 From: DMD Date: Fri, 2 Sep 2016 17:11:11 +0300 Subject: [PATCH] Added get_int_64 null handle checking --- TemplePlus/gamesystems/objects/objsystem_hooks.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TemplePlus/gamesystems/objects/objsystem_hooks.cpp b/TemplePlus/gamesystems/objects/objsystem_hooks.cpp index 2e017a307..2059a8388 100644 --- a/TemplePlus/gamesystems/objects/objsystem_hooks.cpp +++ b/TemplePlus/gamesystems/objects/objsystem_hooks.cpp @@ -116,7 +116,10 @@ static class ObjSystemHooks : public TempleFix { }); // obj_get_int64 - replaceFunction(0x1009e2e0, [](objHndl handle, obj_f field) { + replaceFunction(0x1009e2e0, [](objHndl handle, obj_f field) ->int64_t{ + if (!handle) { + return 0i64; + } return GetObj(handle)->GetInt64(field); });