From 9835845e220ea2236a90d939ad901247fcd74bc4 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 17 Aug 2015 14:18:57 -0400 Subject: Fix segfault from focus_view --- sway/layout.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sway/layout.c b/sway/layout.c index 1bc65050..f4079d4b 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -285,6 +285,9 @@ void unfocus_all(swayc_t *container) { } void focus_view(swayc_t *view) { + if (!view) { + return; + } sway_log(L_DEBUG, "Setting focus for %p:%ld", view, view->handle); swayc_t *c = view; //Set focus from root to view -- cgit v1.2.3-54-g00ecf