diff options
author | Bas Nieuwenhuizen <[email protected]> | 2016-03-28 17:01:49 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-03-28 18:02:07 +0200 |
commit | dd5f0950e4105b022d6c909e0a39fe38426312c4 (patch) | |
tree | 13691cc9cb7708f1a8d477511abf556cff5a80d8 /src/mesa/state_tracker | |
parent | b4c72b792caecd8be271af20de92d24b4ae7da4c (diff) |
mesa/st: Fix NULL access if no fragment shader is bound
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_constbuf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 4d9b344111b..a980dbedac5 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -65,8 +65,8 @@ void st_upload_constants( struct st_context *st, shader_type == PIPE_SHADER_COMPUTE); /* update the ATI constants before rendering */ - struct ati_fragment_shader *ati_fs = st->fp->ati_fs; - if (shader_type == PIPE_SHADER_FRAGMENT && ati_fs) { + if (shader_type == PIPE_SHADER_FRAGMENT && st->fp->ati_fs) { + struct ati_fragment_shader *ati_fs = st->fp->ati_fs; unsigned c; for (c = 0; c < MAX_NUM_FRAGMENT_CONSTANTS_ATI; c++) { |