From 88eab3760e6bdb8665324ac936e5eba74d29dfef Mon Sep 17 00:00:00 2001 From: alexs75 Date: Mon, 30 Sep 2013 04:46:22 +0000 Subject: [PATCH] RxDBLookupCombo - fix AV if LookupDisplay property not set git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2799 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/rx/rxlookup.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/rx/rxlookup.pas b/components/rx/rxlookup.pas index 2ef62eb73..674b249ad 100644 --- a/components/rx/rxlookup.pas +++ b/components/rx/rxlookup.pas @@ -1510,7 +1510,7 @@ begin FKeyField := nil; FDisplayField := nil; DataSet:=nil; - if FLookupDataLink.Active and (FLookupField <> '') then + if FLookupDataLink.Active and (FLookupField <> '') and (FFieldList.Count>FLookupDisplayIndex) and (FLookupDisplayIndex>=0) then begin CheckNotCircular; DataSet := FLookupDataLink.DataSet;