From 86cc4c822f2ec2be7a09cf562281d04793988143 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 19 Dec 2013 04:42:25 +0000 Subject: [PATCH] Silence AV in 64 bit mode when preventing second application instance. Fixes issue #3475. --- source/helpers.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/helpers.pas b/source/helpers.pas index ca9dc1a9..5dd0480d 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -1960,7 +1960,8 @@ begin Dat.dwData := SecondInstMsgId; Dat.lpData := ParamStrToBlob(Dat.cbData); SendMessage(Wnd, WM_COPYDATA, 0, LPARAM(@Dat)); - FreeMemory(Dat.lpData); + // Leads to an AV in 64bit mode. See issue #3475: + // FreeMemory(Dat.lpData); // Bring first instance to front if not IsWindowVisible(Wnd) then