git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit96a58fb15b17f50a427307215415beb1c175d047
parent1daaa7eced
authorIsaac Freund <[email protected]>
date2020-04-04 23:35
Avoid a crash caused by a race conditon

 src/output.zig | 5 +++++
 1 file changed, 5 insertions(+)

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);
         }