Merge pull request #1605 from keymanapp/developer-crash-saving-keyboard-5835

[Developer] Crash when creating new touch layout in certain circumstances.
This commit is contained in:
Marc Durdin 2019-02-20 09:14:47 +11:00 committed by GitHub
commit da8a523fe0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -464,9 +464,15 @@ procedure TframeTouchLayoutBuilder.Save(const AFilename: string);
var
s: string;
begin
if (FFilename = '') and (AFilename <> '') then
begin
Load(AFilename, not FileExists(AFilename), False);
end;
if not IsModified and FileExists(AFilename) then // I4047 // I4147
Exit;
s := GetLayoutJS;
if s = '' then
Exit;
FSavedLayoutJS := s;