Skip to content

Osd: do not connect to Output::destroyed signal

Luca Bacci requested to merge lucabacci/kscreen:bug-466914 into master

Actually I'm not sure if I got everything right, as I'm quite new to the codebase, so please bear with me! 🙂

From my understanding, Osd keeps a strong reference to an Output (m_output, which is private), as such there's no need for observing Output for destruction. Moreover, doing that can pose risks because the signal can be invoked in the middle of Osd destruction (precisely when m_output is destructed, which happens after the Osd destructor is run)

Another possible fix is to convert m_output to a weak ref.

BUG: 466914

Edited by Luca Bacci

Merge request reports