* Fix from Graeme Geldenhuys to avoid memleaks by early exit

git-svn-id: trunk@37054 -
This commit is contained in:
michael 2017-08-24 14:53:33 +00:00
parent 4f6b0feda3
commit f6918dac3e
2 changed files with 6 additions and 3 deletions

View File

@ -105,7 +105,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="polygon;../units/$(TargetCPU)-$(TargetOS)"/> <OtherUnitFiles Value="polygon;../src"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<Linking> <Linking>

View File

@ -331,8 +331,7 @@ begin
Writeln(''); Writeln('');
Writeln('Known demos for this binary: '); Writeln('Known demos for this binary: ');
ListReports(True); ListReports(True);
Free; ExitCode:=Ord(Msg<>'')
Halt(Ord(Msg<>''));
end; end;
procedure TReportDemoApplication.ListReports(AWithIndentation: boolean); procedure TReportDemoApplication.ListReports(AWithIndentation: boolean);
@ -421,7 +420,11 @@ begin
OnGetApplicationName:=@GetReportAppName; OnGetApplicationName:=@GetReportAppName;
S:=CheckOptions('lj::hf:r:d:',['list','json::','help','format:','runtime:','demo:']); S:=CheckOptions('lj::hf:r:d:',['list','json::','help','format:','runtime:','demo:']);
if (S<>'') or HasOption('h','help') then if (S<>'') or HasOption('h','help') then
begin
Usage(S); Usage(S);
Terminate;
exit;
end;
if HasOption('l','list') then if HasOption('l','list') then
begin begin
ListReports; ListReports;