Skip to content

Commit a37528b

Browse files
committed
Fix crash in premium preview.
1 parent 51a5818 commit a37528b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Telegram/SourceFiles/ui/effects/premium_bubble.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ Bubble::Bubble(
6464
const auto texts = _textFactory(0);
6565
_numberAnimation.setText(texts.counter, 0);
6666
_numberAnimation.finishAnimating();
67-
_additional.setText(_st.additionalStyle, texts.additional);
67+
if (!texts.additional.isEmpty()) {
68+
_additional.setText(_st.additionalStyle, texts.additional);
69+
}
6870
}
6971

7072
crl::time Bubble::SlideNoDeflectionDuration() {
@@ -120,7 +122,9 @@ void Bubble::setCounter(int value) {
120122
_counter = value;
121123
const auto texts = _textFactory(value);
122124
_numberAnimation.setText(texts.counter, value);
123-
_additional.setText(_st.additionalStyle, texts.additional);
125+
if (!texts.additional.isEmpty()) {
126+
_additional.setText(_st.additionalStyle, texts.additional);
127+
}
124128
}
125129
}
126130

0 commit comments

Comments
 (0)