fixed checking in TLRSObjectReader.Destroy if FStream is assigned

git-svn-id: trunk@5822 -
This commit is contained in:
mattias 2004-08-19 07:13:07 +00:00
parent f46b2eb66c
commit f0d075ab77

View File

@ -2212,7 +2212,8 @@ end;
destructor TLRSObjectReader.Destroy;
begin
{ Seek back the amount of bytes that we didn't process until now: }
FStream.Seek(Integer(FBufPos) - Integer(FBufEnd), soFromCurrent);
if Assigned(FStream) then
FStream.Seek(Integer(FBufPos) - Integer(FBufEnd), soFromCurrent);
if Assigned(FBuffer) then
FreeMem(FBuffer, FBufSize);