From 1bef78634bdbf27b3845bcc62317a234f31db022 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 10 Jun 2010 22:19:38 +0000 Subject: [PATCH] Avoid endless loop in SQL help topics tree on broken help tables, by displaying a category node as topic item if has the same name as its parent category. Fixes issue #1988. --- source/sqlhelp.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/sqlhelp.pas b/source/sqlhelp.pas index be2d5e83..45cbd717 100644 --- a/source/sqlhelp.pas +++ b/source/sqlhelp.pas @@ -120,7 +120,7 @@ begin Results := Mainform.Connection.GetResults( 'HELP "'+topic+'"' ); while not Results.Eof do begin tnode := treeTopics.Items.AddChild( ParentNode, Results.Col('name')); - if Results.ColExists('is_it_category') and (Results.Col('is_it_category') = 'Y') then begin + if (Results.Col('is_it_category', True) = 'Y') and ((ParentNode = nil) or (ParentNode.Text <> tnode.Text)) then begin tnode.ImageIndex := ICONINDEX_CATEGORY_CLOSED; tnode.SelectedIndex := ICONINDEX_CATEGORY_OPENED; // Add a dummy item to show the plus-button so the user sees that there this