Skip to content

Commit f4d048d

Browse files
author
Roberto De Ioris
committed
fixed python-like uobject creation
1 parent cfe147e commit f4d048d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Source/UnrealEnginePython/Private/UEPyModule.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,9 @@ static PyObject *ue_PyUObject_call(ue_PyUObject *self, PyObject *args, PyObject
758758
Py_INCREF((PyObject *)self);
759759
PyTuple_SetItem(py_args, 0, (PyObject *)self);
760760
if (py_name) {
761+
Py_INCREF(py_outer);
761762
PyTuple_SetItem(py_args, 1, py_outer);
763+
Py_INCREF(py_name);
762764
PyTuple_SetItem(py_args, 2, py_name);
763765
}
764766
PyObject *ret = py_unreal_engine_new_object(nullptr, py_args);
@@ -1299,7 +1301,7 @@ void unreal_engine_py_log_error() {
12991301
}
13001302

13011303
PyErr_Clear();
1302-
}
1304+
}
13031305

13041306
// retrieve a UWorld from a generic UObject (if possible)
13051307
UWorld *ue_get_uworld(ue_PyUObject *py_obj) {

0 commit comments

Comments
 (0)