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
This commit is contained in:
alexs75
2013-09-30 04:46:22 +00:00
parent e644913963
commit 88eab3760e

View File

@ -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;