* Fixed some AV's

git-svn-id: trunk@8030 -
This commit is contained in:
joost 2007-07-12 20:58:15 +00:00
parent bb8ba21960
commit 86823a8c86

View File

@ -228,11 +228,11 @@ begin
result := el.asstring; result := el.asstring;
finally finally
if WCreated then if WCreated then
FWriter.Free; FreeAndNil(FWriter);
end; end;
finally finally
if created then if created then
FDocument.Free; FreeAndNil(FDocument);
end; end;
end; end;
@ -419,7 +419,7 @@ Var
M : TMemoryStream; M : TMemoryStream;
begin begin
CreateDocument; FDocument := CreateDocument;
Try Try
FWriter:=CreateWriter(FDocument); FWriter:=CreateWriter(FDocument);
Try Try
@ -435,10 +435,10 @@ begin
end; end;
FDocument.SaveToStream(AResponse.ContentStream); FDocument.SaveToStream(AResponse.ContentStream);
Finally Finally
FWriter.Free; FreeAndNil(FWriter);
end; end;
Finally Finally
FDocument.Free; FreeAndNil(FDocument);
end; end;
end; end;