diff --git a/components/fpdebug/fpdbgclasses.pp b/components/fpdebug/fpdbgclasses.pp index d38ce34c0c..22ce1a453a 100644 --- a/components/fpdebug/fpdbgclasses.pp +++ b/components/fpdebug/fpdbgclasses.pp @@ -2871,7 +2871,7 @@ end; procedure TDbgProcess.AfterBreakpointAdded(ABreak: TFpDbgBreakpoint); begin - if not assigned(FCurrentBreakpoint) then begin + if (FMainThread <> nil) and not assigned(FCurrentBreakpoint) then begin if ABreak.HasLocation(FMainThread.GetInstructionPointerRegisterValue) then FCurrentBreakpoint := TFpInternalBreakpoint(ABreak); end;