Skip to content

Handle shader creation failures

The returned handle of glCreateShader() was not checked against 0 and subsequently passed to other OpenGL functions to compile the invalid shader object.

Then the compile status is randomly initialized and the following if condition is very likely not to trigger as intended.

This fix handles failures during shader object creation and early-outs as soon as possible with a descriptive error message.

This fix is based on the release branch.

Backport: release

Edited by David E. DeMarle

Merge request reports