summaryrefslogtreecommitdiff
path: root/libwnck/xutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libwnck/xutils.c')
-rw-r--r--libwnck/xutils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 02ce741..e7dc56a 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -1796,6 +1796,8 @@ try_pixmap_and_mask (Screen *screen,
if (surface == NULL)
return FALSE;
+ gdk_error_trap_push ();
+
width = cairo_xlib_surface_get_width (surface);
height = cairo_xlib_surface_get_height (surface);
@@ -1834,6 +1836,12 @@ try_pixmap_and_mask (Screen *screen,
cairo_surface_destroy (surface);
cairo_destroy (cr);
+ if (gdk_error_trap_pop () != Success)
+ {
+ cairo_surface_destroy (image);
+ return FALSE;
+ }
+
unscaled = gdk_pixbuf_get_from_surface (image,
0, 0,
width, height);