mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 02:28:14 +02:00
* avoid double free when reusing chmsitemap objects
git-svn-id: trunk@11884 -
This commit is contained in:
parent
9ab9c1517c
commit
d6c5cacd80
@ -277,6 +277,7 @@ begin
|
||||
FSiteMapType := AType;
|
||||
FSiteMapTags := [smtNone];
|
||||
FSiteMapBodyTags := [smbtNone];
|
||||
FHTMLParser:=nil;
|
||||
FItems := TChmSiteMapItems.Create(Self, nil); ;
|
||||
end;
|
||||
|
||||
@ -302,7 +303,7 @@ begin
|
||||
FHTMLParser.OnFoundTag := @FoundTag;
|
||||
FHTMLParser.OnFoundText := @FoundText;
|
||||
FHTMLParser.Exec;
|
||||
FHTMLParser.Free;
|
||||
FreeAndNil(FHTMLParser);
|
||||
end;
|
||||
|
||||
procedure TChmSiteMap.LoadFromStream(AStream: TStream);
|
||||
@ -316,7 +317,7 @@ begin
|
||||
FHTMLParser.OnFoundTag := @FoundTag;
|
||||
FHTMLParser.OnFoundText := @FoundText;
|
||||
FHTMLParser.Exec;
|
||||
FHTMLParser.Free;
|
||||
FreeAndNil(FHTMLParser);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user