diff --git a/components/rx/rxlookup.pas b/components/rx/rxlookup.pas index 35311e5f6..f86721591 100644 --- a/components/rx/rxlookup.pas +++ b/components/rx/rxlookup.pas @@ -1006,10 +1006,11 @@ begin FRxPopUpForm:=ShowRxDBPopUpForm(Self, FLookupDataLink.DataSet, @OnClosePopup, FPopUpFormOptions, FLookupDisplay, LookupDisplayIndex, 0 {ButtonWidth}, Font); {$IFDEF LINUX} - TempF:=FRxPopUpForm; - if FRxPopUpForm.ShowModal = mrOk then - OnClosePopup(true); - TempF.Free; + TempF:=FRxPopUpForm; + if FRxPopUpForm.ShowModal = mrOk then + OnClosePopup(true); + TempF.Free; + FRxPopUpForm:=nil {$ENDIF} end end;