sna: Add a pair of asserts to track down a NULL pointer dereference

Looks like the assumption for the location of the data is invalid,
allocation failure, perhaps?

References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-05-04 20:56:37 +01:00
parent d376a960df
commit 771090f25d
1 changed files with 2 additions and 0 deletions

View File

@ -460,6 +460,8 @@ static struct kgem_bo *upload(struct sna *sna,
priv->mapped = false;
}
if (pixmap->devPrivate.ptr == NULL) {
assert(priv->ptr);
assert(priv->stride);
pixmap->devPrivate.ptr = priv->ptr;
pixmap->devKind = priv->stride;
}