Merge pull request #2586 from RyanDwyer/fix-fullscreen-focus-crash

Fix crash when focusing from fullscreen in an invalid direction
This commit is contained in:
Drew DeVault 2018-09-05 22:12:54 -04:00 committed by GitHub
commit c6a74cb4df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 // Fullscreen container with a direction - go straight to outputs
struct sway_output *output = container->workspace->output; struct sway_output *output = container->workspace->output;
struct sway_output *new_output = output_get_in_direction(output, dir); 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); return get_node_in_output_direction(new_output, dir);
} }
if (dir == MOVE_PARENT) { if (dir == MOVE_PARENT) {