[Lazarus] Lazarus Release Candidate 1 of 1.4
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Feb 19 11:01:47 CET 2015
On Thu, 19 Feb 2015 10:47:18 +0100
Andrea Mauri <andrea.mauri.75 at gmail.com> wrote:
> Dear all,
> I am testing Lazarus 1.4RC2 r FPC 2.6.4 i386-win32-win32/win64
>[...]
> procedure TForm1.TreeView1Click(Sender: TObject);
> var
> i: integer;
> begin
> i:= TreeView1.Selected.Level;
> end;
>
>
> When I click on the checkbox of any treeview node I got a sigsegv error
> here:
>
> function TTreeNode.GetLevel: Integer;
> // root is on level 0
> var
> ANode: TTreeNode;
> begin
> Result := 0;
> ANode := Parent; <----
> while Assigned(ANode) do
> begin
> Inc(Result);
> ANode := ANode.Parent;
> end;
> end;
It probably means TreeView1.Selected is nil. If you think it should not
be nil, then please create a bug report with a complete example.
Mattias
More information about the Lazarus
mailing list