summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_composite.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 5b815964..55a496e6 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -740,15 +740,18 @@ sna_composite_rectangles(CARD8 op,
goto fallback;
}
+ priv = sna_pixmap(pixmap);
+ if (priv == NULL) {
+ DBG(("%s: fallback, not attached\n", __FUNCTION__));
+ goto fallback;
+ }
+
/* If we going to be overwriting any CPU damage with a subsequent
* operation, then we may as well delete it without moving it
* first to the GPU.
*/
- if (op <= PictOpSrc) {
- priv = sna_pixmap_attach(pixmap);
- if (priv)
- sna_damage_subtract(&priv->cpu_damage, &region);
- }
+ if (op <= PictOpSrc)
+ sna_damage_subtract(&priv->cpu_damage, &region);
priv = sna_pixmap_move_to_gpu(pixmap, MOVE_READ | MOVE_WRITE);
if (priv == NULL) {