https://bugs.kde.org/show_bug.cgi?id=443858

--- Comment #6 from Fushan Wen <qydwhotm...@gmail.com> ---
Git commit 9b8a9dfda3d3d8df167336ce3f029af8bf0401f5 by Fushan Wen.
Committed on 23/12/2021 at 04:54.
Pushed by fusionfuture into branch 'master'.

powerprofileconfig: Use m_profileCombo as the watcher's parent

`m_profileCombo` could be an invalid pointer, because when clicking an
item, `QAbstractItemView::clicked` and `QAbstractItemView::activated` in
systemsettings both will be emitted, and `IconMode::changeModule` will be
called twice, and `closeModules()` will free `m_profileCombo` in the
second call, which will crash systemsettings.

To fix the crash, set the watcher's parent to `m_profileCombo`, so when
`m_profileCombo` is destroyed, the watcher is also destroyed and the
connection is disconnected to prevent modification to the old `m_profileCombo`.

M  +1    -1    daemon/actions/bundled/powerprofileconfig.cpp

https://invent.kde.org/plasma/powerdevil/commit/9b8a9dfda3d3d8df167336ce3f029af8bf0401f5

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to