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
This commit is contained in:
Campbell Barton
2025-01-07 10:13:42 +11:00
parent 2f309c10c5
commit 6ae599c588

View File

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