diff --git a/source/blender/python/generic/python_compat.hh b/source/blender/python/generic/python_compat.hh index 5e0e7dd4cfd..58f36280423 100644 --- a/source/blender/python/generic/python_compat.hh +++ b/source/blender/python/generic/python_compat.hh @@ -34,7 +34,7 @@ PyObject *oname = PyUnicode_FromString(name); if (oname == nullptr) { *result = nullptr; - return nullptr; + return -1; } const int status = PyObject_GetOptionalAttr(obj, oname, result); Py_DECREF(oname);