jvcllaz: Fix TJvDBTreeView and TJvDBLookupTreeView crashing the IDE when they are deleted from the form.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6871 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2019-04-27 17:26:49 +00:00
parent 0bd361c6e9
commit a012c5158d

View File

@ -1581,7 +1581,9 @@ var
strLength: Integer;
HasChildren: Byte;
begin
if Items.Count > 0 then
// wp: not clear if this still works correctly: had to add "Assigned(Items)"
// to prevent crash when destroying
if Assigned(Items) and (Items.Count > 0) then
begin
// save master values into stream
FMastersStream := TMemoryStream.Create;