(cherry picked from commit 80b73e42b8a0e5aee36d1cac65ed2ffd9a6473ae) Source commit: d13dea1530f23a1a686e3983579d515f52267920
@@ -411,7 +411,10 @@ void __fastcall TMessageTimeout::DoTimer(TObject * /*Sender*/)
// Needed particularly for "keep up to date" dialog, which does not close on the button click
Enabled = false;
TModalResult PrevModalResult = FButton->ModalResult;
- FButton->ModalResult = FAnswer;
+ if (FAnswer != 0)
+ {
+ FButton->ModalResult = FAnswer;
+ }
try
{
FButton->Click();