mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
mesa/st: Check for a NULL _LinkedShader[i] before using it.
The rest of the linker/glsl translation code checks for NULL, so I suppose we should check here too. Fixes crash on exit with i915g instanced drawing. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
0f55f133f1
commit
ddba509c16
1 changed files with 2 additions and 1 deletions
|
|
@ -1154,7 +1154,8 @@ destroy_shader_program_variants_cb(GLuint key, void *data, void *userData)
|
|||
}
|
||||
|
||||
for (i = 0; i < Elements(shProg->_LinkedShaders); i++) {
|
||||
destroy_program_variants(st, shProg->_LinkedShaders[i]->Program);
|
||||
if (shProg->_LinkedShaders[i])
|
||||
destroy_program_variants(st, shProg->_LinkedShaders[i]->Program);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue