Fix possible crash in join channel toast.

This commit is contained in:
John Preston 2024-03-18 10:53:29 +04:00
parent 8982a49192
commit 98abb3aa00

View file

@ -1746,7 +1746,7 @@ void ApiWrap::joinChannel(not_null<ChannelData*> channel) {
} }
return QString(); return QString();
}(); }();
if (!text.isEmpty()) { if (show && !text.isEmpty()) {
show->showToast(text, kJoinErrorDuration); show->showToast(text, kJoinErrorDuration);
} }
} }