fix #122 - compile a runnable with not project opened, case of segfault

This commit is contained in:
Basile Burg 2017-02-14 01:27:16 +01:00
parent 17fe5f62d5
commit 0aefd3341c
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 11 additions and 8 deletions

View File

@ -2518,16 +2518,19 @@ begin
if fDoc.isTemporary then
result := of_yes;
end
else if ifInProject in fRunnablesOptions.outputFolderConditions then
else if assigned(fProject) then
begin
if fProject.isSource(fDoc.fileName) then
result := of_yes;
if ifInProject in fRunnablesOptions.outputFolderConditions then
begin
if fProject.isSource(fDoc.fileName) then
result := of_yes;
end
else if ifSaved in fRunnablesOptions.outputFolderConditions then
begin
if not fProject.isSource(fDoc.fileName) and not fDoc.isTemporary then
result := of_yes;
end;
end
else if ifSaved in fRunnablesOptions.outputFolderConditions then
begin
if not fProject.isSource(fDoc.fileName) and not fDoc.isTemporary then
result := of_yes;
end;
end;
end;