diff options
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r-- | sway/commands/focus.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index 14e90955..8baa616d 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c @@ -182,6 +182,10 @@ static struct sway_node *node_get_in_direction_floating( double closest_distance = DBL_MAX; struct sway_container *closest_con = NULL; + if (!con->workspace) { + return NULL; + } + for (int i = 0; i < con->workspace->floating->length; i++) { struct sway_container *floater = con->workspace->floating->items[i]; if (floater == con) { |