Update toonz/sources/toonzqt/styleeditor.cpp

fix crash on shrinking docked style editor panel

Co-authored-by: justburner <433868+justburner@users.noreply.github.com>
This commit is contained in:
shun-iwasawa 2022-01-19 10:21:43 +09:00 committed by manongjohn
parent caf6d70d60
commit 1030d98f38

View file

@ -1334,6 +1334,7 @@ void ColorSlider::paintEvent(QPaintEvent *event) {
w -= s_chandle_size; w -= s_chandle_size;
h -= 3; h -= 3;
} }
if (w < 2 || h < 2) return;
QPixmap bgPixmap = QPixmap bgPixmap =
makeLinearShading(m_color, m_channel, isVertical ? h : w, isVertical); makeLinearShading(m_color, m_channel, isVertical ? h : w, isVertical);