summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/screen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/screen.c b/src/core/screen.c
index b4cb5ef7..162046e8 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1240,17 +1240,17 @@ get_window_pixbuf (MetaWindow *window,
return NULL;
#endif
+#if GTK_CHECK_VERSION (3, 0, 0)
meta_error_trap_push (NULL);
-#if GTK_CHECK_VERSION (3, 0, 0)
pixbuf = meta_ui_get_pixbuf_from_surface (surface);
cairo_surface_destroy (surface);
-#else
- pixbuf = meta_ui_get_pixbuf_from_pixmap (pmap);
-#endif
if (meta_error_trap_pop_with_return (NULL, FALSE) != Success)
g_clear_object (&pixbuf);
+#else
+ pixbuf = meta_ui_get_pixbuf_from_pixmap (pmap);
+#endif
if (pixbuf == NULL)
return NULL;