Skip to content

Commit

Permalink
Fix crash issue due to args.GetCondArgObjHndl without checking handle…
Browse files Browse the repository at this point in the history
… validity
  • Loading branch information
DMD authored and DMD committed Jul 11, 2020
1 parent 24b6a13 commit a3361c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TemplePlus/dispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,8 @@ int32_t DispatcherCallbackArgs::GetCondArg(uint32_t argIdx)
objHndl DispatcherCallbackArgs::GetCondArgObjHndl(uint32_t argIdx)
{
objHndl handle { ((((uint64_t)GetCondArg(argIdx)) << 32) | GetCondArg(argIdx + 1)) };
if (!gameSystems->GetObj().IsValidHandle(handle))
handle = objHndl::null;
return handle;
}

Expand Down

0 comments on commit a3361c4

Please sign in to comment.