mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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) {
|
if (!_saveCallback) {
|
||||||
return;
|
return;
|
||||||
} else if (_addAsAdmin && !_addAsAdmin->checked()) {
|
} else if (_addAsAdmin && !_addAsAdmin->checked()) {
|
||||||
|
const auto weak = Ui::MakeWeak(this);
|
||||||
AddBotToGroup(user(), peer(), _addingBot->token);
|
AddBotToGroup(user(), peer(), _addingBot->token);
|
||||||
getDelegate()->hideLayer();
|
if (const auto strong = weak.data()) {
|
||||||
|
strong->closeBox();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
} else if (_addingBot && !_addingBot->existing) {
|
} else if (_addingBot && !_addingBot->existing) {
|
||||||
const auto phrase = peer()->isBroadcast()
|
const auto phrase = peer()->isBroadcast()
|
||||||
|
|
Loading…
Add table
Reference in a new issue