From eb5a8e03ff10d956de70f121bc70fd4cad524a9f Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 31 Mar 2018 10:51:39 -0400 Subject: [PATCH] Check for null container --- sway/input/cursor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/input/cursor.c b/sway/input/cursor.c index f558a37a..74af6426 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -182,7 +182,7 @@ static void handle_cursor_button(struct wl_listener *listener, void *data) { // // TODO: Replace this condition with something like // !surface_accepts_keyboard_input - if (surface && cont->type != C_VIEW) { + if (surface && cont && cont->type != C_VIEW) { struct sway_container *new_ws = cont; if (new_ws && new_ws->type != C_WORKSPACE) { new_ws = container_parent(new_ws, C_WORKSPACE);