Skip to content

Commit 9e96ce4

Browse files
author
meak
committed
fix: cmd_sticky crash sway with empty container
1 parent 8dadfd4 commit 9e96ce4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sway/commands/sticky.c

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ struct cmd_results *cmd_sticky(int argc, char **argv) {
1616
return error;
1717
}
1818
struct sway_container *container = config->handler_context.container;
19+
20+
if (container == NULL) {
21+
return cmd_results_new(CMD_FAILURE, "sticky", "No current container");
22+
};
23+
1924
if (!container_is_floating(container)) {
2025
return cmd_results_new(CMD_FAILURE, "sticky",
2126
"Can't set sticky on a tiled container");

0 commit comments

Comments
 (0)