diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarListener.java b/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarListener.java index f0fb6d3a..a6916376 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarListener.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarListener.java @@ -61,10 +61,10 @@ public class DarkScrollBarListener extends MouseAdapter implements AdjustmentLis trackFadeinAnimator = createTrackFadeinAnimator(); thumbFadeoutAnimator = createThumbFadeoutAnimator(); thumbFadeinAnimator = createThumbFadeinAnimator(); - trackFadeoutAnimator.setEnabled(animationsEnabled); - trackFadeinAnimator.setEnabled(animationsEnabled); - thumbFadeoutAnimator.setEnabled(animationsEnabled); - thumbFadeinAnimator.setEnabled(animationsEnabled); + if (trackFadeoutAnimator != null) trackFadeoutAnimator.setEnabled(animationsEnabled); + if (trackFadeinAnimator != null) trackFadeinAnimator.setEnabled(animationsEnabled); + if (thumbFadeoutAnimator != null) thumbFadeoutAnimator.setEnabled(animationsEnabled); + if (thumbFadeinAnimator != null) thumbFadeinAnimator.setEnabled(animationsEnabled); } public void uninstall() {