Skip to content

Commit b1c0ed5

Browse files
committed
Check whether InstallPath from Registry exists
1 parent 1e2dad4 commit b1c0ed5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

PythonForDelphi/Components/Sources/Core/PythonVersions.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ function GetRegisteredPythonVersion(SysVersion: string;
320320
PythonVersion.DLLPath := PythonVersion.InstallPath;
321321
CloseKey;
322322
end;
323-
Result := PythonVersion.InstallPath <> '';
323+
Result := (PythonVersion.InstallPath <> '') and
324+
DirectoryExists(ExcludeTrailingPathDelimiter(PythonVersion.InstallPath));
324325
if not Result then Exit;
325326

326327
if OpenKey(Key, False) then begin

0 commit comments

Comments
 (0)