File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -4216,7 +4216,7 @@ procedure TPythonEngine.Initialize;
42164216
42174217  gPythonEngine := Self;
42184218  CheckRegistry;
4219-   if  Assigned(Py_SetProgramName) and  (ProgramName <>  ' ' then 
4219+   if  Assigned(Py_SetProgramName) and  (Length(FProgramName) >  0 ) then 
42204220    Py_SetProgramName(PWCharT(FProgramName));
42214221  AssignPyFlags;
42224222  if  Length(FPythonHome) > 0  then 
@@ -4468,7 +4468,10 @@ procedure TPythonEngine.SetPyFlags(const Value: TPythonFlags);
44684468function   TPythonEngine.GetPythonHome : UnicodeString;
44694469begin 
44704470{ $IFDEF POSIX} 
4471-   Result := UCS4StringToUnicodeString(FPythonHome);
4471+   if  Length(FPythonHome) = 0  then 
4472+     Result := ' ' 
4473+   else 
4474+     Result := UCS4StringToUnicodeString(FPythonHome);
44724475{ $ELSE} 
44734476  Result := FPythonHome;
44744477{ $ENDIF} 
@@ -4477,7 +4480,10 @@ function  TPythonEngine.GetPythonHome: UnicodeString;
44774480function   TPythonEngine.GetProgramName : UnicodeString;
44784481begin 
44794482{ $IFDEF POSIX} 
4480-   Result := UCS4StringToUnicodeString(FProgramName);
4483+   if  Length(FProgramName) = 0  then 
4484+     Result := ' ' 
4485+   else 
4486+     Result := UCS4StringToUnicodeString(FProgramName);
44814487{ $ELSE} 
44824488  Result := FProgramName;
44834489{ $ENDIF} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments