From 6ae599c5883926be76c16cefc8ac6b34ca23b5d3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Jan 2025 10:13:42 +1100 Subject: [PATCH] Fix gpu.shader.from_builtin exception without returning null Returning an object instead of null meant to exception would not be raised as intended. Oversight in !132686 --- source/blender/python/gpu/gpu_py_shader.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/python/gpu/gpu_py_shader.cc b/source/blender/python/gpu/gpu_py_shader.cc index 69fd14edca5..d411750c604 100644 --- a/source/blender/python/gpu/gpu_py_shader.cc +++ b/source/blender/python/gpu/gpu_py_shader.cc @@ -1041,6 +1041,7 @@ static PyObject *pygpu_shader_from_builtin(PyObject * /*self*/, PyObject *args, if (shader == nullptr) { PyErr_Format(PyExc_ValueError, "Builtin shader doesn't exist in the requested config"); + return nullptr; } return BPyGPUShader_CreatePyObject(shader, true);