Skip to content

[plugins/notifications] Prevent crash when default notification action is invoked.

Nicolas Fella requested to merge work/notiindex into master

When the notification's default action is activated, i.e. the notification is clicked, activated with index 0 is emitted. This will lead to a crash since m_actions[-1] will be accessed.

This does not happen on Plasma since we don't specify that we have a default action and thus the notification isn't clickable. However on LXDE the notification is clickable regardless and we get the according signal.

This arguably works around a bug in LXDE, but given that the workaround is cheap and other systems may behave this way too I think it's reasonable to do this.

BUG: 427717

Merge request reports