mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 05:00:07 +02:00
* fix for 10554
git-svn-id: trunk@9742 -
This commit is contained in:
parent
0456481984
commit
db3eb67852
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user