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

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to