From c6631e21403a305fd0b47c8de74ac6586cf794eb Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Fri, 18 Aug 2017 12:41:42 -0400 Subject: Fix wild pointer to buffer After the buffer is released from the release event, it should no longer be accessed. Fixes a GTK crash. --- types/wlr_surface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/types/wlr_surface.c b/types/wlr_surface.c index 43f8f65a..cb0aa27f 100644 --- a/types/wlr_surface.c +++ b/types/wlr_surface.c @@ -293,6 +293,7 @@ release: pixman_region32_init(&surface->current.buffer_damage); wl_resource_queue_event(surface->current.buffer, WL_BUFFER_RELEASE); + surface->current.buffer = NULL; } static void surface_set_buffer_transform(struct wl_client *client, -- cgit v1.2.3