also return nil for the empty env vars in the generic implementation in GetEnvPChar

git-svn-id: trunk@24733 -
This commit is contained in:
Károly Balogh 2013-06-01 17:40:34 +00:00
parent 678fb02f11
commit 76d7527909

View File

@ -902,6 +902,11 @@ implementation
{$undef GETENVOK}
{$else}
GetEnvPchar:=StrPNew(GetEnvironmentVariable(envname));
if (length(GetEnvPChar)=0) then
begin
FreeEnvPChar(GetEnvPChar);
GetEnvPChar:=nil;
end;
{$endif}
end;