[Bf-blender-cvs] [8fa8cea8e01] master: Fix PyGPU: return NULL instead of PyNone on error

Germano Cavalcante noreply at git.blender.org
Tue Nov 29 18:00:03 CET 2022


Commit: 8fa8cea8e016b0c9e615501380a22adb02021599
Author: Germano Cavalcante
Date:   Tue Nov 29 13:59:52 2022 -0300
Branches: master
https://developer.blender.org/rB8fa8cea8e016b0c9e615501380a22adb02021599

Fix PyGPU: return NULL instead of PyNone on error 

Error in d7f124f06f3fda59523ed05f12d1f4af6a523ba6

===================================================================

M	source/blender/python/gpu/gpu_py.c

===================================================================

diff --git a/source/blender/python/gpu/gpu_py.c b/source/blender/python/gpu/gpu_py.c
index 34557f0115b..a3948ebad15 100644
--- a/source/blender/python/gpu/gpu_py.c
+++ b/source/blender/python/gpu/gpu_py.c
@@ -56,13 +56,13 @@ static const char g_error[] = "GPU API is not available in background mode";
 static PyObject *py_error__ml_meth(PyObject *UNUSED(self), PyObject *UNUSED(args))
 {
   PyErr_SetString(PyExc_SystemError, g_error);
-  Py_RETURN_NONE;
+  return NULL;
 }
 
 static PyObject *py_error__getter(PyObject *UNUSED(self), void *UNUSED(type))
 {
   PyErr_SetString(PyExc_SystemError, g_error);
-  Py_RETURN_NONE;
+  return NULL;
 }
 
 static int py_error__setter(PyObject *UNUSED(self), PyObject *value, void *UNUSED(type))



More information about the Bf-blender-cvs mailing list