Skip to content

Commit 76fd962

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

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎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)