* Do not raise exception unless needed

git-svn-id: trunk@38006 -
This commit is contained in:
michael 2018-01-19 08:35:30 +00:00
parent df61c3fa0d
commit 1ba38d5b87

View File

@ -86,11 +86,8 @@ begin
fItemList:=TFPList.Create;
//read NewHeader from resource
RawData.Position:=0;
try
RawData.ReadBuffer(nh,sizeof(nh));
except
on e : EReadError do exit; //empty stream
end;
if RawData.Read(nh,sizeof(nh))<>nh then
exit;
{$IFDEF ENDIAN_BIG}
nh.reserved:=SwapEndian(nh.reserved);
nh.restype:=SwapEndian(nh.restype);