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( | |||
182 | double closest_distance = DBL_MAX; | 182 | double closest_distance = DBL_MAX; |
183 | struct sway_container *closest_con = NULL; | 183 | struct sway_container *closest_con = NULL; |
184 | 184 | ||
185 | if (!con->workspace) { | ||
186 | return NULL; | ||
187 | } | ||
188 | |||
185 | for (int i = 0; i < con->workspace->floating->length; i++) { | 189 | for (int i = 0; i < con->workspace->floating->length; i++) { |
186 | struct sway_container *floater = con->workspace->floating->items[i]; | 190 | struct sway_container *floater = con->workspace->floating->items[i]; |
187 | if (floater == con) { | 191 | if (floater == con) { |