Skip to content

Commit 76fd962

Browse files
author
Roberto De Ioris
committed
fixed UPythonFunction destructor
1 parent 28b1f98 commit 76fd962

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Source/UnrealEnginePython/Private/PythonFunction.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ void UPythonFunction::CallPythonCallable(FFrame& Stack, RESULT_DECL)
121121

122122
UPythonFunction::~UPythonFunction()
123123
{
124+
FScopePythonGIL gil;
124125
Py_XDECREF(py_callable);
125126
FUnrealEnginePythonHouseKeeper::Get()->UnregisterPyUObject(this);
126127
#if defined(UEPY_MEMORY_DEBUG)

0 commit comments

Comments
 (0)