mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Fixed possible crash for bot owners in earn section for bots.
This commit is contained in:
parent
074bb1e66e
commit
49223a4688
1 changed files with 4 additions and 4 deletions
|
@ -833,7 +833,7 @@ void InnerWidget::fill() {
|
|||
Ui::AddSkip(container);
|
||||
}
|
||||
#ifndef _DEBUG
|
||||
if (!channel->amCreator()) {
|
||||
if (channel && !channel->amCreator()) {
|
||||
Ui::AddSkip(container);
|
||||
Ui::AddSkip(container);
|
||||
return;
|
||||
|
@ -1346,8 +1346,8 @@ void InnerWidget::fill() {
|
|||
handleSlice(firstSlice);
|
||||
if (!firstSlice.allLoaded) {
|
||||
struct ShowMoreState final {
|
||||
ShowMoreState(not_null<ChannelData*> channel)
|
||||
: api(channel) {
|
||||
ShowMoreState(not_null<PeerData*> peer)
|
||||
: api(peer) {
|
||||
}
|
||||
Api::EarnStatistics api;
|
||||
bool loading = false;
|
||||
|
@ -1355,7 +1355,7 @@ void InnerWidget::fill() {
|
|||
rpl::variable<int> showed = 0;
|
||||
};
|
||||
const auto state
|
||||
= lifetime().make_state<ShowMoreState>(channel);
|
||||
= lifetime().make_state<ShowMoreState>(_peer);
|
||||
state->token = firstSlice.token;
|
||||
state->showed = firstSlice.list.size();
|
||||
const auto max = firstSlice.total;
|
||||
|
|
Loading…
Add table
Reference in a new issue