Merge branch 'subtree'
[fanfix.git] / src / jexer / TProgressBar.java
index 6ed5ccf752dbb8553bf7308be4165c165f6a8b43..38f03373b7c8d5d08f323f0e56fa34bac1516048 100644 (file)
@@ -123,6 +123,12 @@ public class TProgressBar extends TWidget {
      */
     @Override
     public void draw() {
+
+        if (getWidth() <= 2) {
+            // Bail out, we are too narrow to draw anything.
+            return;
+        }
+
         CellAttributes completeColor = getTheme().getColor("tprogressbar.complete");
         CellAttributes incompleteColor = getTheme().getColor("tprogressbar.incomplete");