From e89e0d7dcd9d7a14b2dc3274f496781f57d362db Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 1 Jun 2023 10:57:17 +0200 Subject: [PATCH] lcl: ShowModal: handleexception of Idle, otherwise error dialog is auto closed --- lcl/include/customform.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index 853e4dde5f..e1f857ddce 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -3040,7 +3040,14 @@ begin if ModalResult<>0 then break; end; - Application.Idle(true); + try + Application.Idle(true); + except + if Application.CaptureExceptions then + Application.HandleException(Self) + else + raise; + end; until False; Result := ModalResult;