From 1454d1c8f872644374772266c3da136e923d50a4 Mon Sep 17 00:00:00 2001 From: emersion Date: Sun, 28 Oct 2018 14:14:35 +0100 Subject: rootston: fix segfault in view_at Make sure the view is mapped. --- rootston/desktop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootston/desktop.c b/rootston/desktop.c index 69c71867..8cb9e0d5 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -576,6 +576,9 @@ static bool view_at(struct roots_view *view, double lx, double ly, view->wl_shell_surface->state == WLR_WL_SHELL_SURFACE_STATE_POPUP) { return false; } + if (view->wlr_surface == NULL) { + return false; + } double view_sx = lx - view->x; double view_sy = ly - view->y; -- cgit v1.2.3 From 0c7371221c35a94e1fd7abf77f09dabd202d6c98 Mon Sep 17 00:00:00 2001 From: emersion Date: Sun, 28 Oct 2018 23:15:36 +0100 Subject: rootston: fix segfault when destroying unmapped fullscreen views --- rootston/desktop.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rootston/desktop.c b/rootston/desktop.c index 8cb9e0d5..7da64ef8 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -439,6 +439,11 @@ void view_destroy(struct roots_view *view) { view_unmap(view); } + // Can happen if fullscreened while unmapped, and hasn't been mapped + if (view->fullscreen_output != NULL) { + view->fullscreen_output->fullscreen_view = NULL; + } + if (view->destroy) { view->destroy(view); } -- cgit v1.2.3