2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Version 4.2.3: Fix possible crash in premium section.

This commit is contained in:
John Preston
2022-09-28 15:56:44 +04:00
parent 4c276e2357
commit 073c1a4d0f

View File

@@ -1650,7 +1650,10 @@ QPointer<Ui::RpWidget> Premium::createPinnedToBottom(
_radioGroup->setChangedCallback([=](int value) {
const auto options =
_controller->session().api().premium().subscriptionOptions();
Expects(value < options.size() && value >= 0);
if (options.empty()) {
return;
}
Assert(value < options.size() && value >= 0);
auto text = tr::lng_premium_subscribe_button(
tr::now,
lt_cost,