diff --git a/src/ftxui/dom/scroll_indicator.cpp b/src/ftxui/dom/scroll_indicator.cpp index c96fdbb..2f1cfe2 100644 --- a/src/ftxui/dom/scroll_indicator.cpp +++ b/src/ftxui/dom/scroll_indicator.cpp @@ -40,6 +40,9 @@ Element vscroll_indicator(Element child) { const Box& stencil = screen.stencil; int size_inner = box_.y_max - box_.y_min; + if (size_inner <= 0) { + return; + } int size_outter = stencil.y_max - stencil.y_min + 1; if (size_outter >= size_inner) { return;