diff --git a/Telegram/SourceFiles/boxes/edit_participant_box.cpp b/Telegram/SourceFiles/boxes/edit_participant_box.cpp index 77a275278..402450f45 100644 --- a/Telegram/SourceFiles/boxes/edit_participant_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_participant_box.cpp @@ -216,13 +216,15 @@ void EditAdminBox::prepare() { addCheckbox(Flag::f_add_admins, lang(lng_rights_add_admins)); } - _aboutAddAdmins = addControl(object_ptr(this, st::boxLabel)); auto addAdmins = _checkboxes.find(Flag::f_add_admins); - t_assert(addAdmins != _checkboxes.end()); - connect(addAdmins->second, &Ui::Checkbox::changed, this, [this] { + if (addAdmins != _checkboxes.end()) { + _aboutAddAdmins = addControl(object_ptr(this, st::boxLabel)); + t_assert(addAdmins != _checkboxes.end()); + connect(addAdmins->second, &Ui::Checkbox::changed, this, [this] { + refreshAboutAddAdminsText(); + }); refreshAboutAddAdminsText(); - }); - refreshAboutAddAdminsText(); + } addButton(langFactory(lng_settings_save), [this] { if (!_saveCallback) {