Check for null manager type
This commit is contained in:
parent
9b70f24e91
commit
03e8d28456
|
@ -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<Manager>(system));
|
||||
}
|
||||
} else {
|
||||
if (*system->managerType() != ManagerType::Default) {
|
||||
system->setManager(nullptr);
|
||||
}
|
||||
} else if (!system->managerType().has_value()
|
||||
|| *system->managerType() != ManagerType::Default) {
|
||||
system->setManager(nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue