Fixed crash in box for giveaway create when winners number is constant.

This commit is contained in:
23rd 2024-09-01 21:31:12 +03:00 committed by John Preston
parent 1e8e660133
commit d78348fd16
1 changed files with 3 additions and 0 deletions

View File

@ -850,6 +850,9 @@ void CreateGiveawayBox(
? creditsOptionWinners(credits)
: availablePresets;
const auto count = values.size();
if (count <= 1) {
return;
}
const auto sliderWidth = sliderState->slider->width()
- st::settingsScale.seekSize.width();
for (auto i = 0; i < count; i++) {