Skip to content

Commit ca0c0ec

Browse files
committed
meta-wayland-single-pixel-buffer.c: Use correct cogl ref function,
fix leak. - In muffin, cogl objects aren't GObjects. - While testing, the extra refs leaked according to valgrind, so unref first.
1 parent 85d3b3b commit ca0c0ec

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/wayland/meta-wayland-single-pixel-buffer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ meta_wayland_single_pixel_buffer_attach (MetaWaylandBuffer *buffer,
122122

123123
if (buffer->single_pixel.texture)
124124
{
125-
*texture = g_object_ref (buffer->single_pixel.texture);
125+
cogl_clear_object (texture);
126+
*texture = cogl_object_ref (buffer->single_pixel.texture);
126127
return TRUE;
127128
}
128129

0 commit comments

Comments
 (0)