diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 7afdd560c7..eb7ca59e54 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -722,13 +722,13 @@ void Create(Window::Notifications::System *system) { using ManagerType = Window::Notifications::ManagerType; if ((Core::App().settings().nativeNotifications() && Supported()) || Enforced()) { - if (*system->managerType() != ManagerType::Native) { + if (!system->managerType().has_value() + || *system->managerType() != ManagerType::Native) { system->setManager(std::make_unique(system)); } - } else { - if (*system->managerType() != ManagerType::Default) { - system->setManager(nullptr); - } + } else if (!system->managerType().has_value() + || *system->managerType() != ManagerType::Default) { + system->setManager(nullptr); } };