mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 13:17:18 +02:00
LCL: Prevent a crash when closing a form with an active in-place cell editor of a grid. Issue #37202.
git-svn-id: trunk@63541 -
This commit is contained in:
parent
c63e4ba86a
commit
1f0ff07dc2
@ -8412,9 +8412,11 @@ var
|
|||||||
begin
|
begin
|
||||||
if not EditorLocked and (Editor<>nil) and Editor.Visible then
|
if not EditorLocked and (Editor<>nil) and Editor.Visible then
|
||||||
begin
|
begin
|
||||||
WasFocused := Editor.Focused;
|
FEditorMode := False;
|
||||||
FEditorMode:=False;
|
|
||||||
FGridState := gsNormal;
|
FGridState := gsNormal;
|
||||||
|
if Editor.Owner<>nil then // May be nil when the form is closing.
|
||||||
|
begin
|
||||||
|
WasFocused := Editor.Focused;
|
||||||
{$ifdef dbgGrid}DebugLnEnter('EditorHide [',Editor.ClassName,'] INIT FCol=',IntToStr(FCol),' FRow=',IntToStr(FRow));{$endif}
|
{$ifdef dbgGrid}DebugLnEnter('EditorHide [',Editor.ClassName,'] INIT FCol=',IntToStr(FCol),' FRow=',IntToStr(FRow));{$endif}
|
||||||
LockEditor;
|
LockEditor;
|
||||||
try
|
try
|
||||||
@ -8426,6 +8428,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$ifdef dbgGrid}DebugLnExit('EditorHide END');{$endif}
|
{$ifdef dbgGrid}DebugLnExit('EditorHide END');{$endif}
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomGrid.EditorLocked: boolean;
|
function TCustomGrid.EditorLocked: boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user