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
This commit is contained in:
Florian Müllner
2016-04-14 15:30:31 +02:00
parent bdc72dd9d7
commit 8842bdfb11
8 changed files with 63 additions and 9 deletions

View File

@ -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);