LazBuild: Fix Access Violation when processing --add-package. Issue #40343, patch by Dean Mustakinov.

This commit is contained in:
Juha 2023-06-22 12:19:21 +03:00
parent 1d6009e63c
commit b5fb939257

View File

@ -9,6 +9,7 @@ uses
SysUtils,
{$IF FPC_FULLVERSION>30100}
pkgFppkg,
fpmkunit,
fprepos,
LazarusIDEStrConsts,
{$ENDIF}
@ -70,6 +71,9 @@ begin
FPpkg := TpkgFPpkg.Create(nil);
try
try
if not Assigned(Defaults) then
Defaults := TBasicDefaults.Create;
FPpkg.InitializeGlobalOptions(FOverrideConfigurationFilename);
FPpkg.InitializeCompilerOptions;