summaryrefslogtreecommitdiff
path: root/library/src/layout
diff options
context:
space:
mode:
Diffstat (limited to 'library/src/layout')
-rw-r--r--library/src/layout/table.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/src/layout/table.rs b/library/src/layout/table.rs
index 3235c790..357263f4 100644
--- a/library/src/layout/table.rs
+++ b/library/src/layout/table.rs
@@ -175,6 +175,10 @@ impl Layout for TableElem {
// Add lines and backgrounds.
for (frame, rows) in layout.fragment.iter_mut().zip(&layout.rows) {
+ if layout.cols.is_empty() || rows.is_empty() {
+ continue;
+ }
+
// Render table lines.
if let Some(stroke) = &stroke {
let thickness = stroke.thickness;