summaryrefslogtreecommitdiff
path: root/glamor
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2014-12-11 16:50:38 +0900
committerKeith Packard <keithp@keithp.com>2014-12-11 19:36:19 -0800
commit0355e280a39dee68981b2cbebfa2573cfde2f5bd (patch)
tree05a9af8ac7144b403678255071b7747c51d03e77 /glamor
parent45b333525e4626523f2b3b7bb360404b6366750d (diff)
glamor: Make glamor_set_pixmap_private not crash if the pixmap has no fbo
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glamor')
-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);
}