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