[PATCH 2/4] glamor: Make glamor_set_pixmap_private not crash if the pixmap has no fbo

Michel Dänzer michel at daenzer.net
Wed Dec 10 23:50:38 PST 2014


From: Michel Dänzer <michel.daenzer at amd.com>

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 glamor/glamor.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/glamor/glamor.c b/glamor/glamor.c
index c4f3f3a..cbd0e02 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -563,8 +563,11 @@ glamor_set_pixmap_private(PixmapPtr pixmap, glamor_pixmap_private *priv)
     else {
         if (old_priv == NULL)
             return;
-        fbo = glamor_pixmap_detach_fbo(old_priv);
-        glamor_purge_fbo(fbo);
+
+        if (old_priv->base.fbo) {
+            fbo = glamor_pixmap_detach_fbo(old_priv);
+            glamor_purge_fbo(fbo);
+        }
         free(old_priv);
     }
 
-- 
2.1.3



More information about the xorg-devel mailing list