sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 8859da1dc32f49d33a28878e6adfb266fe7aa43a
parent 97474f12e371c7b92c57f1f107897c29f0f704b2
Author: Ryan Dwyer <ryandwyer1@gmail.com>
Date:   Thu,  6 Sep 2018 12:03:13 +1000

Fix crash when focusing from fullscreen in an invalid direction

* Fullscreen a view
* Run `focus <direction>` where there is no output in that direction

The output returned was rightfully NULL, which needs to be handled.

Diffstat:
Msway/commands/focus.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/sway/commands/focus.c b/sway/commands/focus.c @@ -102,6 +102,9 @@ static struct sway_node *node_get_in_direction(struct sway_container *container, // Fullscreen container with a direction - go straight to outputs struct sway_output *output = container->workspace->output; struct sway_output *new_output = output_get_in_direction(output, dir); + if (!new_output) { + return NULL; + } return get_node_in_output_direction(new_output, dir); } if (dir == MOVE_PARENT) {