- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 325
Closed
Labels
Description
DoOpenDl loop for all PYTHON_KNOWN_VERSIONS defined versions. But if the version is not found then inherited is called with an empty name which causes AV. Inherited should be called only if UseLastKnownVersion is false.
`procedure TPythonEngine.DoOpenDll(const aDllName : string);
var
i : Integer;
begin
if UseLastKnownVersion then
for i:= Integer(COMPILED_FOR_PYTHON_VERSION_INDEX) downto 1 do
begin
RegVersion := PYTHON_KNOWN_VERSIONS[i].RegVersion;
inherited DoOpenDll(PYTHON_KNOWN_VERSIONS[i].DllName);
if IsHandleValid then
begin
DllName := PYTHON_KNOWN_VERSIONS[i].DllName;
APIVersion := PYTHON_KNOWN_VERSIONS[i].APIVersion;
Exit;
end;
end
else begin
RegVersion := SysVersionFromDLLName(aDllName);
inherited;  <--- HERE
end;
end;'
pult