lazbuild: fixed showing memleaks on error

git-svn-id: trunk@48699 -
This commit is contained in:
mattias 2015-04-10 19:51:46 +00:00
parent a96cfe9231
commit a7316c5d9f
2 changed files with 7 additions and 3 deletions

View File

@ -766,11 +766,15 @@ begin
Item.Free;
FFiles.Delete(i);
end else begin
debugln(['TFPCMsgFilePool.Destroy file still used: ',Item.Filename]);
if ExitCode=0 then
debugln(['TFPCMsgFilePool.Destroy file still used: ',Item.Filename]);
end;
end;
if FFiles.Count>0 then
if FFiles.Count>0 then begin
if ExitCode<>0 then
exit;
raise Exception.Create('TFPCMsgFilePool.Destroy some files are still used');
end;
FreeAndNil(FFiles);
if FPCMsgFilePool=Self then
FPCMsgFilePool:=nil;

View File

@ -1505,7 +1505,7 @@ begin
exit;
end;
// Add package to list of to be installed packages)
// Add package to list of to be installed packages
if HasOption('add-package') then begin
AddPackage:=true;
if ConsoleVerbosity>=0 then