LCL: Prevent an exception with MouseDown on a Grid which lost focus. Issue #39730, patch by Soner.

This commit is contained in:
Juha 2022-05-18 00:12:31 +03:00
parent eeccdaa7fc
commit 7f199b0d44

View File

@ -6777,7 +6777,8 @@ begin
{$ENDIF}
if not Focused and not(csNoFocus in ControlStyle) then begin
SetFocus;
if CanFocus then
SetFocus;
if not Focused then begin
{$ifDef dbgGrid} DebugLnExit('TCustomGrid.MouseDown EXIT: Focus not allowed'); {$Endif}
exit;