mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
st/mesa: fix a segfault when prog->sh.data is NULL
Broken by: st/mesa: get Version from gl_program rather than gl_shader_program Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
37f9262064
commit
3477f67057
1 changed files with 3 additions and 1 deletions
|
|
@ -123,11 +123,13 @@ update_textures(struct st_context *st,
|
|||
struct pipe_sampler_view *sampler_view = NULL;
|
||||
|
||||
if (samplers_used & 1) {
|
||||
/* prog->sh.data is NULL if it's ARB_fragment_program */
|
||||
unsigned glsl_version = prog->sh.data ? prog->sh.data->Version : 0;
|
||||
const GLuint texUnit = prog->SamplerUnits[unit];
|
||||
GLboolean retval;
|
||||
|
||||
retval = update_single_texture(st, &sampler_view, texUnit,
|
||||
prog->sh.data->Version);
|
||||
glsl_version);
|
||||
if (retval == GL_FALSE)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue