On Thu, 19 Feb 2015 10:47:18 +0100 Andrea Mauri <[email protected]> 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 -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
