mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fix possible crash on empty options from the server.
This commit is contained in:
parent
de11987312
commit
58cedb796e
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,9 @@ namespace Api {
|
|||
template<typename Option>
|
||||
[[nodiscard]] Data::SubscriptionOptions SubscriptionOptionsFromTL(
|
||||
const QVector<Option> &tlOptions) {
|
||||
if (tlOptions.isEmpty()) {
|
||||
return {};
|
||||
}
|
||||
auto result = Data::SubscriptionOptions();
|
||||
const auto monthlyAmount = [&] {
|
||||
const auto &min = ranges::min_element(
|
||||
|
|
Loading…
Add table
Reference in a new issue