Make sure the devPrivate.ptr of a textured pixmap is NULL.

Just in case when wrongly fallback to DDX layer and cause
random memory corruption. Pointed out by Chris.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
Zhigang Gong 2011-12-16 20:15:33 +08:00 committed by Eric Anholt
parent 5769d8603d
commit 7285f2e836

View File

@ -116,6 +116,7 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, int w, int h, unsigned int tex)
pixmap->drawable.
bitsPerPixel + 7) / 8) +
3) & ~3, NULL);
pixmap->devPrivate.ptr = NULL;
}
/* Set screen pixmap. If tex equal to 0, means it is called from ephyr. */