fix error when dast not found

This commit is contained in:
Basile Burg 2015-09-15 23:07:37 +02:00
parent 7e50d1ba77
commit 22b9b8d47a
1 changed files with 10 additions and 6 deletions

View File

@ -370,11 +370,14 @@ begin
fDefaultFontSize := 10;
SetDefaultCoeditKeystrokes(Self); // not called in inherited if owner = nil !
//
fAst := newAST(self, @astScanned);
fAstTimer := TIdleTimer.Create(self);
fAstTimer.Interval:= 2000;
fAstTimer.OnTimer:= @AstTimerEvent;
fAstTimer.Enabled:=true;
if dastAvailable then
begin
fAst := newAST(self, @astScanned);
fAstTimer := TIdleTimer.Create(self);
fAstTimer.Interval:= 2000;
fAstTimer.OnTimer:= @AstTimerEvent;
fAstTimer.Enabled:=true;
end;
//
ShowHint := false;
InitHintWins;
@ -452,7 +455,8 @@ begin
if fileExists(fTempFileName) then
sysutils.DeleteFile(fTempFileName);
//
deleteAst(fAst);
if dastAvailable then
deleteAst(fAst);
//
inherited;
end;