bugfix for 49698

This commit is contained in:
Christian Hammacher 2007-01-15 15:56:48 +00:00
parent f96f95c4ff
commit 3a2839c6c9
2 changed files with 5 additions and 0 deletions

Binary file not shown.

View File

@ -26,6 +26,8 @@ type TPAWNCompileThread = class(TThread)
function DoCompilePAWN(eFlags: Integer): Boolean; function DoCompilePAWN(eFlags: Integer): Boolean;
var Compiling: Boolean;
implementation implementation
uses UnitfrmSettings, UnitLanguages, UnitMainTools, UnitfrmMain, uses UnitfrmSettings, UnitLanguages, UnitMainTools, UnitfrmMain,
@ -35,12 +37,14 @@ function DoCompilePAWN(eFlags: Integer): Boolean;
var eFile: string; var eFile: string;
begin begin
Result := False; Result := False;
if (Compiling) then exit;
if not FileExists(frmSettings.txtPAWNCompilerPath.Text) then begin if not FileExists(frmSettings.txtPAWNCompilerPath.Text) then begin
MessageBox(frmMain.Handle, PChar(lPAWNCompilerNotFound), PChar(Application.Title), MB_ICONERROR); MessageBox(frmMain.Handle, PChar(lPAWNCompilerNotFound), PChar(Application.Title), MB_ICONERROR);
exit; exit;
end; end;
Screen.Cursor := crHourGlass; Screen.Cursor := crHourGlass;
Compiling := True;
if (ActiveDoc.Untitled) then if (ActiveDoc.Untitled) then
eFile := ExtractFilePath(ParamStr(0)) + 'Untitled.sma' eFile := ExtractFilePath(ParamStr(0)) + 'Untitled.sma'
else else
@ -226,6 +230,7 @@ begin
CloseHandle(PipeErrorsWrite); CloseHandle(PipeErrorsWrite);
end; end;
Screen.Cursor := crDefault; Screen.Cursor := crDefault;
Compiling := False;
Output.Free; Output.Free;
end; end;