diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-04 23:35:07 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-04 23:35:07 +0200 |
| commit | 5be50921d486cf12fe47702f7e8030b36be7bd28 (patch) | |
| tree | 7ec992a093f0449e825fbff771fb4e860311780c /src/output.zig | |
| parent | ea88cca35f29fd4fef9f6fa4035950685fa4a5fd (diff) | |
| download | river-5be50921d486cf12fe47702f7e8030b36be7bd28.tar.gz river-5be50921d486cf12fe47702f7e8030b36be7bd28.tar.xz | |
Avoid a crash caused by a race conditon
Diffstat (limited to 'src/output.zig')
| -rw-r--r-- | src/output.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/output.zig b/src/output.zig index 3106a74..bbe1a34 100644 --- a/src/output.zig +++ b/src/output.zig @@ -86,6 +86,11 @@ pub const Output = struct { output.root.current_focused_tags, ); while (it.next()) |view| { + // This check prevents a race condition when a frame is requested + // between mapping of a view and the first configure being handled. + if (view.current_box.width == 0 or view.current_box.height == 0) { + continue; + } output.renderView(view, &now); } |
