Skip to content

battery: panel crashes if battey or power profile is not avaialble - #588

Merged
trigg merged 1 commit into
WayfireWM:masterfrom
mrsteve0924:battery
Nov 7, 2026
Merged

trigg merged 1 commit into
WayfireWM:masterfrom
mrsteve0924:battery

Conversation

@mrsteve0924

Copy link
Copy Markdown
Contributor

prevent panel crash when adding battery widget to PC desktop that of course has no battery

When neither a battery nor power profiles is available, initialization
returns without creating the widget box. A subsequent config reload
calls update_layout(), which dereferences the null box and crashes.

Skip the layout update when the box has not been created.

Signed-off-by: stephen finkel <mrsteve0924@verizon.net>
Assisted-by: ChatGPT:GPT-5.6 Sol
@trigg trigg added the LGTM Looks good to me! On last check, good to merge label Nov 4, 2026
@trigg
trigg merged commit 312906d into WayfireWM:master Nov 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM Looks good to me! On last check, good to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants