summaryrefslogtreecommitdiff
path: root/src/intel_dri.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-06 00:17:03 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2011-03-16 18:43:44 +0000
commit38f467ce6a521b58384f9a0ee5088df52da4f383 (patch)
tree24bc57fbdd9ab4e7406171c8407f7df98d1c4097 /src/intel_dri.c
parentfe71c4a928785d03598399f03b7bdd851aaca6c1 (diff)
Clear pixmap->devPrivate.ptr [regression from 7c7294e]
ModifyPixmapHeader(pixdata = NULL) does not clear the pixmap->devPrivate.ptr, instead the NULL value is interpreted as meaning to keep the current value. (This is similar to the interpretation of the other invalid values like depth=-1 which also mean not to change the current property). However pixadata=NULL is indeed a valid value, and in 7c7294e, devPrivate.ptr == NULL was used to differentiate a bo pixmap from a system pixmap. Except that we never did clear the ptr as intended, and so X would immediately crash. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit d1925deedd70c6c4374e42de5aa44989fe328b58) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'src/intel_dri.c')
-rw-r--r--src/intel_dri.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c
index a964c6b4..b9af09c5 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -99,6 +99,7 @@ static PixmapPtr get_front_buffer(DrawablePtr drawable, DrawablePtr *ret)
0, 0,
intel->front_pitch,
NULL);
+ pixmap->devPrivate.ptr = NULL;
intel_set_pixmap_bo(pixmap, intel->front_buffer);
}
} else if (intel_get_pixmap_bo(pixmap)) {