mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 15:17:07 +02:00
Fix possible crash in AddBotToGroupBox.
This commit is contained in:
parent
8adbbe6885
commit
107b72f442
1 changed files with 4 additions and 1 deletions
|
@ -384,8 +384,11 @@ void EditAdminBox::prepare() {
|
|||
if (!_saveCallback) {
|
||||
return;
|
||||
} else if (_addAsAdmin && !_addAsAdmin->checked()) {
|
||||
const auto weak = Ui::MakeWeak(this);
|
||||
AddBotToGroup(user(), peer(), _addingBot->token);
|
||||
getDelegate()->hideLayer();
|
||||
if (const auto strong = weak.data()) {
|
||||
strong->closeBox();
|
||||
}
|
||||
return;
|
||||
} else if (_addingBot && !_addingBot->existing) {
|
||||
const auto phrase = peer()->isBroadcast()
|
||||
|
|
Loading…
Add table
Reference in a new issue