Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Fixed crash if there is no windows to display
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Sultanov committed Mar 14, 2020
1 parent f264c64 commit 64a7ec5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/layout.zig
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ pub const Layout = struct {
}

fn layout(self: *Layout) !void {
if (self.children.len == 0) return;

for (self.children.span()) |*child| {
child.*.box.*.window.hide();
}
Expand Down

0 comments on commit 64a7ec5

Please sign in to comment.