From 6dfc88f10b94a9f815478b4f88d83b80184c981b Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 20 Mar 2009 17:17:00 +0000 Subject: [PATCH] lcl: fix TCustomTreeView.GetInsertMarkAt git-svn-id: trunk@19045 - --- lcl/include/treeview.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lcl/include/treeview.inc b/lcl/include/treeview.inc index b2d0f36393..e25d2708d8 100644 --- a/lcl/include/treeview.inc +++ b/lcl/include/treeview.inc @@ -3401,9 +3401,10 @@ begin if Y<0 then Y:=0; if Y>=ClientHeight then Y:=ClientHeight-1; ANode:=GetNodeAtY(Y); - NodeRect:=ANode.DisplayRect(false); - NodeMidY:=(NodeRect.Top+NodeRect.Bottom) div 2; - if ANode<>nil then begin + if ANode<>nil then + begin + NodeRect:=ANode.DisplayRect(false); + NodeMidY:=(NodeRect.Top+NodeRect.Bottom) div 2; AnInsertMarkNode:=ANode; if (X>AnInsertMarkNode.DisplayExpandSignRight) then if Y>=NodeMidY then begin