https://bugs.kde.org/show_bug.cgi?id=482668
Jakob Petsovits <jpe...@petsovits.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas |ma/powerdevil/-/commit/8ecf |ma/powerdevil/-/commit/aedb |6430ee7a3d3670fd9cb1b6af947 |2529b31ec9b62ee5a8b3548be84 |f9ac2f352 |8769f4009 --- Comment #15 from Jakob Petsovits <jpe...@petsovits.com> --- Git commit aedb2529b31ec9b62ee5a8b3548be848769f4009 by Jakob Petsovits. Committed on 14/03/2024 at 03:28. Pushed by jpetso into branch 'Plasma/6.0'. kcmodule: Don't crash when a configured button action is unsupported The bounds check in the data() method of PowerButtonActionModel and SleepModeModel was incomplete, so passing an invalid index such as -1 (standard value for "not found") could cause a crash. For power management settings, a user would run into this crash if their configuration from powerdevilrc listed a power button action that's not supported on the current system. For example, a user may have selected "Sleep" as lid action, but subsequently changed their systemd configuration to disable suspend-to-RAM because it caused problems. Or they could have migrated their OS to a new computer which does not support Sleep. Fixing this allows us to assign currentIndex declaratively instead of waiting until Component.onCompleted to (hopefully) find a valid item in the model. (cherry picked from commit 8ecf6430ee7a3d3670fd9cb1b6af947f9ac2f352) M +1 -1 kcmodule/common/PowerButtonActionModel.cpp M +1 -1 kcmodule/common/SleepModeModel.cpp M +2 -0 kcmodule/profiles/ui/GlobalConfig.qml M +8 -0 kcmodule/profiles/ui/ProfileConfig.qml https://invent.kde.org/plasma/powerdevil/-/commit/aedb2529b31ec9b62ee5a8b3548be848769f4009 -- You are receiving this mail because: You are watching all bug changes.