Fix crash in non-clickable spoilers.

This commit is contained in:
John Preston 2023-10-23 08:49:34 +04:00
parent 1a9c4162cc
commit 4d1a5686a7

View file

@ -373,8 +373,10 @@ void String::ExtendedWrap::adjustFrom(const ExtendedWrap *other) {
reinterpret_cast<String*>(otherText + raw(this) - raw(other)));
};
if (data) {
if (data->spoiler) {
adjust(data->spoiler->link);
if (const auto spoiler = data->spoiler.get()) {
if (spoiler->link) {
adjust(spoiler->link);
}
}
for (auto &quote : data->quotes) {
if (quote.copy) {