mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 18:49:21 +02:00
also return nil for the empty env vars in the generic implementation in GetEnvPChar
git-svn-id: trunk@24733 -
This commit is contained in:
parent
678fb02f11
commit
76d7527909
@ -902,6 +902,11 @@ implementation
|
|||||||
{$undef GETENVOK}
|
{$undef GETENVOK}
|
||||||
{$else}
|
{$else}
|
||||||
GetEnvPchar:=StrPNew(GetEnvironmentVariable(envname));
|
GetEnvPchar:=StrPNew(GetEnvironmentVariable(envname));
|
||||||
|
if (length(GetEnvPChar)=0) then
|
||||||
|
begin
|
||||||
|
FreeEnvPChar(GetEnvPChar);
|
||||||
|
GetEnvPChar:=nil;
|
||||||
|
end;
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user