[PATCH] toytoolkit: Don't segfault on window close

Jason Ekstrand jason at jlekstrand.net
Mon Oct 28 03:32:54 CET 2013


Without this commit, the client will segmentation fault due to accessing
the frame after everything has been destroyed.

---
 clients/window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clients/window.c b/clients/window.c
index 331569a..be61a53 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -2396,7 +2396,7 @@ frame_handle_status(struct window_frame *frame, struct input *input,
 					      window->user_data);
 		else
 			display_exit(window->display);
-		frame_status_clear(frame->frame, FRAME_STATUS_CLOSE);
+		return;
 	}
 
 	if ((status & FRAME_STATUS_MOVE) && window->shell_surface) {
-- 
1.8.3.1



More information about the wayland-devel mailing list