Skip to content

Commit b6b63c7

Browse files
committed
Added a further check to previous commit.
1 parent 4a688d5 commit b6b63c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/PythonEngine.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9674,7 +9674,7 @@ procedure TPythonThread.Execute;
96749674
begin
96759675
PyThreadState_Swap(fThreadState);
96769676
// Redirect IO
9677-
if RedirectIO and Assigned(IOPythonModule) then
9677+
if RedirectIO and Assigned(IO) and Assigned(IOPythonModule) then
96789678
begin
96799679
TPythonModule(IOPythonModule).InitializeForNewInterpreter;
96809680
DoRedirectIO;

0 commit comments

Comments
 (0)