lazcontrols: fixed crash on invalid type cast, bug #24679, patch by Cyrax

git-svn-id: trunk@41919 -
This commit is contained in:
mattias 2013-06-27 13:47:32 +00:00
parent e4e55c2dda
commit 0bd92fe903

View File

@ -218,7 +218,7 @@ begin
TVNode:=fOwner.fFilteredTreeview.Items.AddChild(fRootNode,FileN);
// Save the long filename to Node.Data
AObject := TObject(fNodeTextToDataMap[FileN]);
if AObject.InheritsFrom(TTFENodeData) then
If Assigned(AObject) And AObject.InheritsFrom(TTFENodeData) then
TTFENodeData(AObject).Node := TVNode;
if fNodeTextToFullFilenameMap.Count > 0 then begin
s:=FileN;