Skip to content

Commit 2e7afba

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

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sway/tree/container.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -727,8 +727,12 @@ void container_set_geometry_from_floating_view(struct sway_container *con) {
727727
}
728728

729729
bool container_is_floating(struct sway_container *container) {
730-
return !container->parent && container->workspace &&
731-
list_find(container->workspace->floating, container) != -1;
730+
if (container) {
731+
return !container->parent && container->workspace &&
732+
list_find(container->workspace->floating, container) != -1;
733+
} else {
734+
return false;
735+
}
732736
}
733737

734738
void container_get_box(struct sway_container *container, struct wlr_box *box) {

0 commit comments

Comments
 (0)