Skip to content

Fix crash on hyprland

Nate Graham requested to merge work/ngraha/maybe-this-fixes-it into master

In policykitlistener.cpp, we check to see if m_session is null. Regardless of whether it was or wasn't, we later call m_session.data()->deleteLater(), which explodes if it was.

Only do this if it was not null.

BUG: 485407 FIXED-IN: 6.1


From the bug report, the only people able to reproduce the issue are on Hyprland, and I am not and have not seen this issue. However symbolicated backtraces indicated that this was the problem. The current code looked incorrect in a way that would cause this crash, and my proposed fix echoes how m_dialog is handled a few lines down.

Targeting 6.1 only because I'm not confident enough in this to stick it in the final 6.0 bugfix release. If it gets merged and any Hyprland users report that it fixes the issue for them, we can always backport it later.

@davidedmundson

Merge request reports