summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uxa/uxa-glyphs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index 0f5dddad..7b2edea4 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -937,6 +937,11 @@ uxa_glyphs_via_mask(CARD8 op,
if (!pixmap)
return 1;
+ if (!uxa_pixmap_is_offscreen(pixmap)) {
+ screen->DestroyPixmap(pixmap);
+ return -1;
+ }
+
uxa_clear_pixmap(screen, uxa_screen, pixmap);
component_alpha = NeedsComponent(maskFormat->format);
@@ -1129,6 +1134,11 @@ fallback:
if (!pixmap)
return;
+ if (!uxa_pixmap_is_offscreen(pixmap)) {
+ screen->DestroyPixmap(pixmap);
+ goto fallback;
+ }
+
gc = GetScratchGC(depth, screen);
if (!gc) {
screen->DestroyPixmap(pixmap);