From 27a2a57a3803f2d79b1f30a4881f8a8d2ca12e1e Mon Sep 17 00:00:00 2001 From: Ronan Pigott Date: Thu, 5 Dec 2019 14:16:14 -0700 Subject: [PATCH] Fix segfault on toggling a scratchpad hidden view --- sway/commands/scratchpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/commands/scratchpad.c b/sway/commands/scratchpad.c index 34871bc6a..7d9ea7077 100644 --- a/sway/commands/scratchpad.c +++ b/sway/commands/scratchpad.c @@ -28,7 +28,7 @@ static void scratchpad_toggle_auto(void) { // Check if the currently focused window is a scratchpad window and should // be hidden again. - if (focus && focus->scratchpad) { + if (focus && focus->scratchpad && focus->workspace) { sway_log(SWAY_DEBUG, "Focus is a scratchpad window - hiding %s", focus->title); root_scratchpad_hide(focus);