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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user