lcl: don't access Items of TreeView if DragOver happens during treeview destruction

git-svn-id: trunk@37372 -
This commit is contained in:
paul 2012-05-21 08:21:05 +00:00
parent e4be3b0c67
commit 94e8990aaf

View File

@ -3624,6 +3624,8 @@ var
i: integer;
begin
Result := nil;
if not Assigned(Items) then
Exit;
if (Y >= BorderWidth) and (Y < (ClientHeight - ScrollBarWidth) - BorderWidth) then
begin
inc(Y, FScrolledTop - BorderWidth);
@ -3659,7 +3661,7 @@ begin
if (X >= BorderWidth) and (X < ClientWidth - BorderWidth) then
begin
Result := GetNodeAtY(Y);
if (Result <> nil) and (X < Result.DisplayExpandSignLeft) then
if Assigned(Result) and (X < Result.DisplayExpandSignLeft) then
Result := nil;
end;
end;