summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glamor/glamor.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index c4f3f3a34..cbd0e02ad 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);
}