diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-05 22:12:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 22:12:54 -0400 |
commit | c6a74cb4df7a50138390a37eb031ef8bd35df7fc (patch) | |
tree | ba9086dfb70d352c9e7efeea024bf7fa63d886b6 | |
parent | Merge pull request #2585 from RyanDwyer/fix-move-across-outputs (diff) | |
parent | Fix crash when focusing from fullscreen in an invalid direction (diff) | |
download | sway-c6a74cb4df7a50138390a37eb031ef8bd35df7fc.tar.gz sway-c6a74cb4df7a50138390a37eb031ef8bd35df7fc.tar.zst sway-c6a74cb4df7a50138390a37eb031ef8bd35df7fc.zip |
Merge pull request #2586 from RyanDwyer/fix-fullscreen-focus-crash
Fix crash when focusing from fullscreen in an invalid direction
-rw-r--r-- | sway/commands/focus.c | 3 |
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, | |||
102 | // Fullscreen container with a direction - go straight to outputs | 102 | // Fullscreen container with a direction - go straight to outputs |
103 | struct sway_output *output = container->workspace->output; | 103 | struct sway_output *output = container->workspace->output; |
104 | struct sway_output *new_output = output_get_in_direction(output, dir); | 104 | struct sway_output *new_output = output_get_in_direction(output, dir); |
105 | if (!new_output) { | ||
106 | return NULL; | ||
107 | } | ||
105 | return get_node_in_output_direction(new_output, dir); | 108 | return get_node_in_output_direction(new_output, dir); |
106 | } | 109 | } |
107 | if (dir == MOVE_PARENT) { | 110 | if (dir == MOVE_PARENT) { |