mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 07:32:41 +02:00
lcl-db: prevent lookup initialization when dataset is destroyed
git-svn-id: trunk@37154 -
This commit is contained in:
parent
465eb5f5c1
commit
09e587db69
@ -171,14 +171,18 @@ procedure TDBLookupComboBox.UpdateLookup;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
if ([csLoading, csDestroying] * ComponentState) = [] then
|
||||
begin
|
||||
if ([csLoading, csDestroying] * ComponentState) <> [] then Exit;
|
||||
|
||||
if FDataLink.Active then
|
||||
begin;
|
||||
FLookup.Initialize(FDataLink, Items);
|
||||
i := FLookup.GetKeyIndex;
|
||||
ItemIndex := i;
|
||||
if i = -1 then
|
||||
Text := '';
|
||||
end;
|
||||
end
|
||||
else i := -1;
|
||||
|
||||
ItemIndex := i;
|
||||
if i = -1 then
|
||||
Text := '';
|
||||
end;
|
||||
|
||||
procedure TDBLookupComboBox.CloseUp;
|
||||
|
Loading…
Reference in New Issue
Block a user