summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/drm/dri1.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri1.c b/src/gallium/state_trackers/dri/drm/dri1.c
index bdf251653d..e216e46a87 100644
--- a/src/gallium/state_trackers/dri/drm/dri1.c
+++ b/src/gallium/state_trackers/dri/drm/dri1.c
@@ -89,10 +89,18 @@ dri1_propagate_drawable_change(struct dri_context *ctx)
{
__DRIdrawable *dPriv = ctx->dPriv;
__DRIdrawable *rPriv = ctx->rPriv;
- struct dri_drawable *draw = dri_drawable(dPriv);
- struct dri_drawable *read = dri_drawable(rPriv);
+ struct dri_drawable *draw;
+ struct dri_drawable *read;
boolean flushed = FALSE;
+ if (dPriv) {
+ draw = dri_drawable(dPriv);
+ }
+
+ if (rPriv) {
+ read = dri_drawable(rPriv);
+ }
+
if (dPriv && draw->texture_stamp != dPriv->lastStamp) {
ctx->st->flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
flushed = TRUE;