diff --git a/toonz/sources/toonzqt/styleeditor.cpp b/toonz/sources/toonzqt/styleeditor.cpp index d6a7a3a..9953396 100644 --- a/toonz/sources/toonzqt/styleeditor.cpp +++ b/toonz/sources/toonzqt/styleeditor.cpp @@ -1274,6 +1274,7 @@ void ColorSlider::paintEvent(QPaintEvent *event) { h -= 2; } } + if (w < 2 || h < 2) return; QPixmap bgPixmap = makeLinearShading(m_color, m_channel, isVertical ? h : w, isVertical);