Fix segfault on toggling a scratchpad hidden view

This commit is contained in:
Ronan Pigott 2019-12-05 14:16:14 -07:00
parent ad189d27f9
commit 27a2a57a38

View file

@ -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);