diff options
author | Florian Müllner <fmuellner@gnome.org> | 2016-04-14 15:30:31 +0200 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2016-04-15 17:22:24 +0200 |
commit | 8842bdfb1159ced73eb95843076c921fdb977779 (patch) | |
tree | b04ee4313db34590b39ed7573d77c4837052a2e0 /src/wayland/meta-wayland-buffer.c | |
parent | bdc72dd9d747a4dd0bc363e9fbba08e41e4110f4 (diff) | |
download | mutter-8842bdfb1159ced73eb95843076c921fdb977779.tar.gz |
Do not skip CoglError parameters
While CoglError is a define to GError, it doesn't follow the convention
of ignoring errors when NULL is passed, but rather treats the error as
fatal :-(
That's clearly unwanted for a compositor, so make sure to always pass
an error parameter where a runtime error is possible (i.e. any CoglError
that is not a malformed blend string).
https://bugzilla.gnome.org/show_bug.cgi?id=765058
Diffstat (limited to 'src/wayland/meta-wayland-buffer.c')
-rw-r--r-- | src/wayland/meta-wayland-buffer.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wayland/meta-wayland-buffer.c b/src/wayland/meta-wayland-buffer.c index 775bd67ca..8c41e81e8 100644 --- a/src/wayland/meta-wayland-buffer.c +++ b/src/wayland/meta-wayland-buffer.c @@ -134,12 +134,19 @@ meta_wayland_buffer_process_damage (MetaWaylandBuffer *buffer, for (i = 0; i < n_rectangles; i++) { + CoglError *error = NULL; cairo_rectangle_int_t rect; cairo_region_get_rectangle (region, i, &rect); cogl_wayland_texture_set_region_from_shm_buffer (buffer->texture, rect.x, rect.y, rect.width, rect.height, shm_buffer, - rect.x, rect.y, 0, NULL); + rect.x, rect.y, 0, &error); + + if (error) + { + meta_warning ("Failed to set texture region: %s\n", error->message); + cogl_error_free (error); + } } wl_shm_buffer_end_access (shm_buffer); |