IDE help: fixed crash on F1 when in source editor and not on a identifier

git-svn-id: trunk@13343 -
This commit is contained in:
mattias 2007-12-15 14:16:34 +00:00
parent e885fe00fe
commit 694ebf28a7

View File

@ -685,9 +685,9 @@ function THelpManager.ShowHelpForSourcePosition(const Filename: string;
if CodeToolBoss.FindDeclarationAndOverload(CodeBuffer,CodePos.X,CodePos.Y,
ListOfPCodeXYPosition,[fdlfWithoutEmptyProperties,fdlfWithoutForwards])
then begin
if ListOfPCodeXYPosition=nil then exit;
debugln('THelpManager.ShowHelpForSourcePosition B Success ',dbgs(ListOfPCodeXYPosition.Count));
// convert the source positions in pascal help context list
if ListOfPCodeXYPosition=nil then exit;
for i:=0 to ListOfPCodeXYPosition.Count-1 do begin
CurCodePos:=PCodeXYPosition(ListOfPCodeXYPosition[i]);
debugln('THelpManager.ShowHelpForSourcePosition C ',CurCodePos^.Code.Filename,' X=',dbgs(CurCodePos^.X),' Y=',dbgs(CurCodePos^.Y));