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))); reinterpret_cast<String*>(otherText + raw(this) - raw(other)));
}; };
if (data) { if (data) {
if (data->spoiler) { if (const auto spoiler = data->spoiler.get()) {
adjust(data->spoiler->link); if (spoiler->link) {
adjust(spoiler->link);
}
} }
for (auto &quote : data->quotes) { for (auto &quote : data->quotes) {
if (quote.copy) { if (quote.copy) {