Protect against nil values for info or SigContext

git-svn-id: trunk@20356 -
This commit is contained in:
pierre 2012-02-15 13:20:26 +00:00
parent 65ec3cfe4e
commit 79c8234c8b

View File

@ -55,7 +55,10 @@ begin
{ this is not allways necessary but I don't know yet
how to tell if it is or not PM }
res:=200;
fpustate:=info^._info.si_code;
if assigned(info) then
fpustate:=info^._info.si_code
else
fpustate:=FPE_IntDiv;
{ if (FpuState and FPU_All) <> 0 then }
begin
@ -91,7 +94,10 @@ begin
if res<>0 then
begin
{$ifdef cpui386}
HandleErrorAddrFrame(res,pointer(SigContext^.sc_eip),pointer(SigContext^.sc_ebp));
if assigned(SigContext) then
HandleErrorAddrFrame(res,pointer(SigContext^.sc_eip),pointer(SigContext^.sc_ebp))
else
HandleErrorAddrFrame(res,nil,nil);
{$endif}
end;
end;