summaryrefslogtreecommitdiff
path: root/src/core/screen.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-04-12 13:46:13 +0300
committermonsta <[email protected]>2016-04-12 13:46:13 +0300
commit758e41a133afb4e95dd91f1cbb66039f7636e4e3 (patch)
tree9e922e8a30d9d90d02c0f3ce0150f81ce2e0ad09 /src/core/screen.c
parentdbc5c7a32bd6ded8ac49d0d258412cd24c9d18ee (diff)
downloadmarco-758e41a133afb4e95dd91f1cbb66039f7636e4e3.tar.bz2
marco-758e41a133afb4e95dd91f1cbb66039f7636e4e3.tar.xz
fix crash on showing alt-tab thumbnails with compositor on (GTK+2)
was my mistake in 9212dacb2bfd5985d8426bf0bdb88f2aca03444e :-/
Diffstat (limited to 'src/core/screen.c')
-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;