Merged revision(s) 49839 #cf3d8e35ba from trunk:

LCL: do not call DoCallKeyEventHandler() inside TWinControl.KeyDown() if Key = 0, since it might be that our control is
destroyed inside OnKeyDown event. Fixes regression of issue #28537
........

git-svn-id: branches/fixes_1_4@49841 -
This commit is contained in:
maxim 2015-09-16 21:35:37 +00:00
parent 1a1d35c81d
commit 508f0453cc

View File

@ -5599,7 +5599,8 @@ end;
procedure TWinControl.KeyDown(var Key: Word; Shift: TShiftState);
begin
if Assigned(FOnKeyDown) then FOnKeyDown(Self, Key, Shift);
DoCallKeyEventHandler(chtOnKeyDown, Key, Shift);
if Key <> 0 then
DoCallKeyEventHandler(chtOnKeyDown, Key, Shift);
end;
{------------------------------------------------------------------------------