LazDebugger: Fix, ensure DefaultContext is available. Broken in e618b09804

(cherry picked from commit c33019c14b)
This commit is contained in:
Martin 2021-12-10 00:19:43 +01:00
parent 87bbace028
commit cbd0330c2c

View File

@ -2537,14 +2537,15 @@ begin
end;
end;
if (CurrentThread <> nil) then
FDebugger.FDbgController.DefaultContext; // Make sure it is avail and cached / so it can be called outside the thread
// Needs to be correct thread, do not interfer with other threads
if (CurrentThread = nil) or
(CurrentCommand = nil) or (CurrentCommand.Thread <> CurrentThread)
then
exit;
FDebugger.FDbgController.DefaultContext; // Make sure it is avail and cached / so it can be called outside the thread
PC := CurrentThread.GetInstructionPointerRegisterValue;
if Assigned(FBreakPoints[bplSehW64Unwound]) and FBreakPoints[bplSehW64Unwound].HasLocation(PC)
then begin