Besides the bugfix, please fix the logic as follows:
procedure TFCamera.CloseForm (OK: boolean);
if FCamera = nil then
if OK and Assigned (FOnReadCode) and (fgLabCode.Text <> '-') then FOnReadCode (fgLabCode.Text);
TfgAnimationHelper.HideForm (Self, [TfgAnimationOption.ReleaseOnFinish]);
FCamera: = nil;
fgBarcodeScanDetected and TfgAnimationHelper.HideForm both are called asynchronously.
TfgAnimationHelper.HideForm with TfgAnimationOption.ReleaseOnFinish flag should not be allowed to call more than once, otherwise it will lead to double destru