summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-01-14 20:58:51 +0100
committerlukefromdc <[email protected]>2019-01-15 04:55:52 +0000
commita931b089754c0fc3e43705e9ac2137803274dced (patch)
treef65e3c85340b2c7dbde45c05cdd1e74898bffaff /src/core
parentc0be5a780b57e4e6133af6dc0c5637090517cd58 (diff)
downloadmarco-a931b089754c0fc3e43705e9ac2137803274dced.tar.bz2
marco-a931b089754c0fc3e43705e9ac2137803274dced.tar.xz
screen: avoid 'NULL' in 'meta_error_trap...' functions
Fixes https://github.com/mate-desktop/marco/issues/445
Diffstat (limited to 'src/core')
-rw-r--r--src/core/screen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/screen.c b/src/core/screen.c
index 5bc5d2e2..4b74ed72 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1221,21 +1221,23 @@ get_window_pixbuf (MetaWindow *window,
int *width,
int *height)
{
+ MetaDisplay *display;
cairo_surface_t *surface;
GdkPixbuf *pixbuf, *scaled;
double ratio;
+ display = window->display;
surface = meta_compositor_get_window_surface (window->display->compositor,
window);
if (surface == None)
return NULL;
- meta_error_trap_push (NULL);
+ meta_error_trap_push (display);
pixbuf = meta_ui_get_pixbuf_from_surface (surface);
cairo_surface_destroy (surface);
- if (meta_error_trap_pop_with_return (NULL, FALSE) != Success)
+ if (meta_error_trap_pop_with_return (display, FALSE) != Success)
g_clear_object (&pixbuf);
if (pixbuf == NULL)