diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkRoundedScrollBarUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkRoundedScrollBarUI.java index bf8354e0..ee211b65 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkRoundedScrollBarUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkRoundedScrollBarUI.java @@ -73,10 +73,12 @@ public abstract class DarkRoundedScrollBarUI extends DarkScrollBarUI { } int arc = horizontal ? height : width; roundRect.setRoundRect(x, y, width, height, arc, arc); - g.setColor(getThumbColor()); - g.fill(roundRect); - g.setColor(getThumbBorderColor()); - g.draw(roundRect); + if (!roundRect.isEmpty()) { + g.setColor(getThumbColor()); + g.fill(roundRect); + g.setColor(getThumbBorderColor()); + g.draw(roundRect); + } context.restore(); }