Packager: Prevent a crash on closing package editor during compile. Issue #36432.

git-svn-id: trunk@62871 -
This commit is contained in:
juha 2020-04-03 12:07:44 +00:00
parent a6e255c463
commit 5af9c69f98

View File

@ -3403,6 +3403,10 @@ begin
begin
EnvironmentOptions.LastOpenPackages.Remove(LazPackage.Filename);
MainIDE.SaveEnvironment;
if not CompileBitBtn.Enabled then begin
DebugLn(['TPackageEditorForm.CanCloseEditor ', Caption, ' compiling, do not close.']);
Result:=mrCancel;
end;
end;
end;
//debugln(['TPackageEditorForm.CanCloseEditor Result=',dbgs(Result),' ',Caption]);