mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 18:49:19 +02:00
Tools/chmmaker: Fix crash when editing table-of-contents of loaded sample project.
This commit is contained in:
parent
fcb70e903a
commit
61ad4be039
@ -14,6 +14,7 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
Filename: String;
|
Filename: String;
|
||||||
begin
|
begin
|
||||||
|
Application.Title:='';
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
Application.CreateForm(TCHMForm, CHMForm);
|
Application.CreateForm(TCHMForm, CHMForm);
|
||||||
Application.CreateForm(TSitemapEditForm, SitemapEditForm);
|
Application.CreateForm(TSitemapEditForm, SitemapEditForm);
|
||||||
|
@ -266,6 +266,7 @@ procedure TSitemapEditForm.LoadFromStream(AStream: TStream);
|
|||||||
ChmItem := Items.Item[I];
|
ChmItem := Items.Item[I];
|
||||||
TreeNode := TChmTreeNode(SitemapTree.Items.AddChild(ParentItem, ChmItem.Text));
|
TreeNode := TChmTreeNode(SitemapTree.Items.AddChild(ParentItem, ChmItem.Text));
|
||||||
TreeNode.Local := ChmItem.Local;
|
TreeNode.Local := ChmItem.Local;
|
||||||
|
if ChmItem.SubItemCount > 0 then
|
||||||
TreeNode.URL := ChmItem.SubItem[0].URL;
|
TreeNode.URL := ChmItem.SubItem[0].URL;
|
||||||
AddItems(ChmItem.Children, TreeNode);
|
AddItems(ChmItem.Children, TreeNode);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user