* fix for 10554

git-svn-id: trunk@9742 -
This commit is contained in:
marco 2008-01-13 19:31:54 +00:00
parent 0456481984
commit db3eb67852

View File

@ -118,7 +118,7 @@ end;
procedure TXMLConfig.Flush;
begin
if Modified then
if (Filename<>EmptyStr) and Modified then
begin
WriteXMLFile(Doc, Filename);
FModified := False;
@ -375,14 +375,14 @@ begin
{$IFDEF MEM_CHECK}CheckHeapWrtMemCnt('TXMLConfig.SetFilename A '+AFilename);{$ENDIF}
if (not ForceReload) and (FFilename = AFilename) then
exit;
Flush;
FreeAndNil(Doc);
FFilename := AFilename;
if csLoading in ComponentState then
exit;
Flush;
FreeAndNil(Doc);
if FileExists(AFilename) and (not FStartEmpty) then
ReadXMLFile(Doc, AFilename);