Add check for null AuthManager just in case.

GitOrigin-RevId: 01fc067b0705589e164fae63a21b405d6813459f
This commit is contained in:
levlam 2019-12-20 16:16:30 +03:00
parent cefc10e0ba
commit 7ed9751b22

View File

@ -939,7 +939,7 @@ void ConfigManager::get_content_settings(Promise<Unit> &&promise) {
}
auto auth_manager = G()->td().get_actor_unsafe()->auth_manager_.get();
if (!auth_manager->is_authorized() || auth_manager->is_bot()) {
if (auth_manager == nullptr || !auth_manager->is_authorized() || auth_manager->is_bot()) {
return promise.set_value(Unit());
}