commit c6a74cb4df7a50138390a37eb031ef8bd35df7fc
parent 2eec9740bd7f88872e9142f522d51a8585c42456
Author: Drew DeVault <sir@cmpwn.com>
Date: Wed, 5 Sep 2018 22:12:54 -0400
Merge pull request #2586 from RyanDwyer/fix-fullscreen-focus-crash
Fix crash when focusing from fullscreen in an invalid direction
Diffstat:
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) {