aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-09-05 22:12:54 -0400
committerGitHub <noreply@github.com>2018-09-05 22:12:54 -0400
commitc6a74cb4df7a50138390a37eb031ef8bd35df7fc (patch)
treeba9086dfb70d352c9e7efeea024bf7fa63d886b6 /sway/commands/focus.c
parent2eec9740bd7f88872e9142f522d51a8585c42456 (diff)
parent8859da1dc32f49d33a28878e6adfb266fe7aa43a (diff)
Merge pull request #2586 from RyanDwyer/fix-fullscreen-focus-crash
Fix crash when focusing from fullscreen in an invalid direction
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 83b8c64a..58721b7e 100644
--- 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) {