summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/state_tracker/st_atom.c2
-rw-r--r--src/mesa/state_tracker/st_manager.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 11c8e91ce9f..f6fc615d224 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -84,7 +84,7 @@ static void check_program_state( struct st_context *st )
/* Flag states used by both new and old shaders to unbind shader resources
* properly when transitioning to shaders that don't use them.
*/
- if (unlikely(new_vp != &old_vp->Base)) {
+ if (unlikely(new_vp != (old_vp ? &old_vp->Base : NULL))) {
if (old_vp)
dirty |= old_vp->affected_states;
if (new_vp)
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index d1c5a0b52ad..ce7a2f6f0ed 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -520,7 +520,7 @@ void
st_framebuffer_reference(struct st_framebuffer **ptr,
struct st_framebuffer *stfb)
{
- struct gl_framebuffer *fb = &stfb->Base;
+ struct gl_framebuffer *fb = stfb ? &stfb->Base : NULL;
_mesa_reference_framebuffer((struct gl_framebuffer **) ptr, fb);
}