From 1f941163d3a74b03d2fbbb3376f89f11664c36ba Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 6 Sep 2018 14:29:26 +1000 Subject: Fix crash when running "layout toggle" The argc and argv used in this function are the same ones used by the layout command itself. --- sway/commands/layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway') diff --git a/sway/commands/layout.c b/sway/commands/layout.c index 44ce2970..ef3ec1cb 100644 --- a/sway/commands/layout.c +++ b/sway/commands/layout.c @@ -29,7 +29,7 @@ static enum sway_container_layout get_layout_toggle(int argc, char **argv, enum sway_container_layout layout, enum sway_container_layout prev_split_layout) { // "layout toggle" - if (argc == 0) { + if (argc == 1) { return layout == L_HORIZ ? L_VERT : L_HORIZ; } -- cgit v1.2.3