Avoid potential disconnect of all signals in IconItem
Summary: m_svgIcon can be null. disconnect(q, nullptr, nullptr, nullptr); would have pretty catastrophic consequences as it disconnects everything. Anyone listening for QObject::destroyed of IconItem for cleanup would no longer get anything. That could lead to obscure conditions. ShaderEffectSource watches for the source being destroyed for cleanup and we have a newly introduced crash with ShaderEffectSource that seems to come from this patch. BUG: 421170 Test Plan: Someone who could reproduce the crash reliably confirms it fixes the issue Reviewers: #plasma Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D29742
This commit is contained in:
parent
54cc2200cc
commit
c215c54ece
@ -196,8 +196,10 @@ public:
|
||||
}
|
||||
|
||||
~SvgSource() {
|
||||
if (m_svgIcon) {
|
||||
QObject::disconnect(m_iconItem, nullptr, m_svgIcon, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
bool isValid() const override
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user