--- meta-wayland-buffer.c 2018-09-04 19:53:56.000000000 +0200 +++ /home/gert/src_mut0_chg/mutter-3.30.0/src/wayland/meta-wayland-buffer.c 2018-10-13 23:10:58.289755843 +0200 @@ -227,12 +227,21 @@ texture = COGL_TEXTURE (cogl_texture_2d_new_from_bitmap (bitmap)); cogl_texture_set_components (COGL_TEXTURE (texture), components); - cogl_object_unref (bitmap); if (!cogl_texture_allocate (COGL_TEXTURE (texture), error)) - g_clear_pointer (&texture, cogl_object_unref); + { + g_clear_pointer (&texture, cogl_object_unref); + cogl_error_free (*error); + *error = NULL; + texture = COGL_TEXTURE (cogl_texture_2d_sliced_new_from_bitmap (bitmap, COGL_TEXTURE_MAX_WASTE)); + cogl_texture_set_components (COGL_TEXTURE (texture), components); + if (!cogl_texture_allocate (COGL_TEXTURE (texture), error)) + g_clear_pointer (&texture, cogl_object_unref); + } wl_shm_buffer_end_access (shm_buffer); + + cogl_object_unref (bitmap); buffer->texture = texture; buffer->is_y_inverted = TRUE;