From bcb870bcf2b31b4b03ef746bd60b74eb3ea9cb78 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Tue, 20 Feb 2018 19:47:48 -0500 Subject: [PATCH] bug: fix crash on focus up --- sway/tree/layout.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 91f0f36f..3d04a1a7 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -421,7 +421,6 @@ static void get_layout_center_position(swayc_t *container, int *x, int *y) { } static bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out) { - *out = 0; switch (dir) { case MOVE_UP: *out = WLR_DIRECTION_UP; @@ -436,10 +435,10 @@ static bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out *out = WLR_DIRECTION_RIGHT; break; default: - break; + return false; } - return *out != 0; + return true; } static swayc_t *sway_output_from_wlr(struct wlr_output *output) {