Fix possible access violation introduces in r21885

r21885 added a new peephole optimizer. The associated code refactoring
missed a check for

  tai(hp1).typ = tai_instruction

Which can lead to an access violation later on, because the rest of the
code expects to find a taicpu in hp1.

git-svn-id: trunk@21949 -
This commit is contained in:
masta 2012-07-22 18:06:08 +00:00
parent bdc62289b4
commit be6bf6e3f7

View File

@ -511,7 +511,8 @@ Implementation
....
}
if (taicpu(p).ops = 2) and
GetNextInstruction(p,hp1) then
GetNextInstruction(p,hp1) and
(tai(hp1).typ = ait_instruction) then
begin
{
This changes the very common