Skip to content

Commit f52af18

Browse files
authored
Merge pull request #2821 from meakio/master
fix: cmd_sticky crash sway with empty container
2 parents e17a992 + 27fb146 commit f52af18

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)