mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-15 13:19:23 +00:00
Merge pull request #4921 from keymanapp/fix/windows/cherry-pick/4848-access-violation-closing-text-editor
fix(windows): access violation closing text editor 🍒
This commit is contained in:
commit
87cbff4e4c
2 changed files with 9 additions and 13 deletions
|
|
@ -480,7 +480,7 @@ begin
|
|||
fmTextEditor:
|
||||
begin // I2720
|
||||
FMutex := TKeymanMutex.Create('KeymanTextEditor');
|
||||
if FMutex.MutexOwned then OpenTextEditor(nil) else FocusTextEditor;
|
||||
if FMutex.MutexOwned then OpenTextEditor else FocusTextEditor;
|
||||
end;
|
||||
|
||||
fmBaseKeyboard: // I4169
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ type
|
|||
public
|
||||
end;
|
||||
|
||||
procedure OpenTextEditor(Owner: TComponent = nil); // I2260
|
||||
procedure OpenTextEditor; // I2260
|
||||
|
||||
implementation
|
||||
|
||||
|
|
@ -223,20 +223,16 @@ resourcestring
|
|||
const
|
||||
GutterWid = 6;
|
||||
|
||||
procedure OpenTextEditor(Owner: TComponent = nil); // I2260
|
||||
procedure OpenTextEditor; // I2260
|
||||
var
|
||||
frmTextEditor: TfrmTextEditor;
|
||||
begin
|
||||
if ApplicationRunning then
|
||||
begin
|
||||
frmTextEditor := TfrmTextEditor.Create(nil);
|
||||
frmTextEditor.Show;
|
||||
end
|
||||
else
|
||||
begin
|
||||
UfrmWebContainer.CreateForm(TfrmTextEditor, frmTextEditor);
|
||||
frmTextEditor.Visible := True;
|
||||
end;
|
||||
UfrmWebContainer.CreateForm(TfrmTextEditor, frmTextEditor);
|
||||
frmTextEditor.Visible := True;
|
||||
ApplicationRunning := True;
|
||||
Application.Run;
|
||||
ApplicationRunning := False;
|
||||
FreeAndNil(frmTextEditor);
|
||||
end;
|
||||
|
||||
{ TfrmTextEditor }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue