xmlstreaming: fixed error handling

git-svn-id: trunk@45657 -
This commit is contained in:
mattias 2014-06-25 07:40:54 +00:00
parent deded5a183
commit 15cadf6352

View File

@ -147,7 +147,7 @@ begin
Writer.WriteRootComponent(AComponent);
XMLConfig.Flush;
finally
if DestroyDriver then
if DestroyDriver and (Writer<>nil) then
Writer.Driver.Free;
Writer.Free;
end;