Fix a crash on Linux without actions notification capability

This commit is contained in:
Ilya Fedin 2025-04-24 06:54:46 +00:00 committed by John Preston
parent 9bdc19e2fd
commit 79cb4668f1

View file

@ -625,10 +625,10 @@ void Manager::Private::showNotification(
actions.push_back(
tr::lng_notification_reply(tr::now).toStdString());
}
actions.push_back({});
}
actions.push_back({});
if (HasCapability("action-icons")) {
hints.insert_value(
"action-icons",
@ -788,11 +788,9 @@ void Manager::Private::showNotification(
info.subtitle),
lt_message,
info.message).toStdString()).c_str(),
!actions.empty()
? (actions
| ranges::views::transform(&gi::cstring::c_str)
| ranges::to_vector).data()
: nullptr,
(actions
| ranges::views::transform(&gi::cstring::c_str)
| ranges::to_vector).data(),
hints.end().gobj_(),
-1,
nullptr,