2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Fix crash in InnerDropdown widget animations.

This commit is contained in:
John Preston
2017-07-26 23:43:18 +03:00
parent dfa7cb1826
commit 180f83c528

View File

@@ -111,7 +111,10 @@ void InnerDropdown::paintEvent(QPaintEvent *e) {
auto ms = getms();
if (_a_show.animating(ms)) {
if (auto opacity = _a_opacity.current(ms, _hiding ? 0. : 1.)) {
_showAnimation->paintFrame(p, 0, 0, width(), _a_show.current(1.), opacity);
// _a_opacity.current(ms)->opacityAnimationCallback()->_showAnimation.reset()
if (_showAnimation) {
_showAnimation->paintFrame(p, 0, 0, width(), _a_show.current(1.), opacity);
}
}
} else if (_a_opacity.animating(ms)) {
p.setOpacity(_a_opacity.current(0.));