summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@ubuntu.com>2014-10-22 15:42:55 +0200
committerMaarten Lankhorst <maarten.lankhorst@ubuntu.com>2014-10-22 15:42:55 +0200
commit79d438ec4d23280a242d36c2d81f2f43f6e90ada (patch)
treedc6fa84f46ac8b1dd94049d42fbc6781bd765f90
parent217f6577afe44b10f7f8e066eaf55419fb0f5ee1 (diff)
fix crash in nouveau_glamor_set_shared_pixmap_backing
-rw-r--r--src/nouveau_glamor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nouveau_glamor.c b/src/nouveau_glamor.c
index ec6ebf9..165e997 100644
--- a/src/nouveau_glamor.c
+++ b/src/nouveau_glamor.c
@@ -129,6 +129,11 @@ nouveau_glamor_set_shared_pixmap_backing(PixmapPtr pixmap, void *_handle)
if (ret)
return FALSE;
+ if (!priv) {
+ priv = calloc(1, sizeof(*priv));
+ nouveau_glamor_pixmap_set(pixmap, priv);
+ }
+
priv->bo = bo;
priv->shared = TRUE;
close(handle);