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:
@ -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);
|
||||
|
Reference in New Issue
Block a user