mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-10 08:51:12 +00:00
Fix crash in intro label crossfade animation.
Remove the assertion because the assumption was not valid. Closed #3270
This commit is contained in:
parent
8a8e101cd0
commit
4fc2c18f58
@ -61,7 +61,12 @@ void CrossFadeAnimation::paintFrame(Painter &p, float64 positionReady, float64 a
|
||||
void CrossFadeAnimation::paintLine(Painter &p, const Line &line, float64 positionReady, float64 alphaWas, float64 alphaNow) {
|
||||
auto &snapshotWas = line.was.snapshot;
|
||||
auto &snapshotNow = line.now.snapshot;
|
||||
t_assert(!snapshotWas.isNull() || !snapshotNow.isNull());
|
||||
if (snapshotWas.isNull() && snapshotNow.isNull()) {
|
||||
// This can happen if both labels have an empty line or if one
|
||||
// label has an empty line where the second one already ended.
|
||||
// In this case lineWidth is zero and snapshot is null.
|
||||
return;
|
||||
}
|
||||
|
||||
auto positionWas = line.was.position;
|
||||
auto positionNow = line.now.position;
|
||||
|
Loading…
Reference in New Issue
Block a user