~vorlon/compiz/lp.763148

Viewing all changes in revision 3645.

Adding a uniform to a GLVertexBuffer that uses AutoProgram causes compiz to segfault.

Example:
  gWindow->addShaders("cms", "", fragment_shader);
  gWindow->vertexBuffer()->addUniform("cms_lut", unit);
  // segfault happens later in PrivateVertexBuffer::render

The patch modifies PrivateVertexBuffer::render to set the uniform on the generated AutoProgram instead of the provided program, which in this case is NULL, causing a segfault.

(LP: #1162598). Fixes: https://bugs.launchpad.net/bugs/1162598.

Approved by PS Jenkins bot, Sam Spilsbury.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: