Check for duplicate calls to init().

This commit is contained in:
levlam 2022-04-26 02:06:35 +03:00
parent 17275fe422
commit dc79b35570
2 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ void NotificationManager::start_up() {
}
void NotificationManager::init() {
if (is_disabled()) {
if (is_disabled() || is_inited_) {
return;
}

View File

@ -1295,7 +1295,7 @@ void StickersManager::start_up() {
}
void StickersManager::init() {
if (!td_->auth_manager_->is_authorized() || td_->auth_manager_->is_bot() || G()->close_flag()) {
if (is_inited_ || !td_->auth_manager_->is_authorized() || td_->auth_manager_->is_bot() || G()->close_flag()) {
return;
}
LOG(INFO) << "Init StickersManager";