Skip to content

PlayerList: guard default_widget against null before MPRIS events - #330

Open
eltictacdicta wants to merge 2 commits into
elementary:mainfrom
eltictacdicta:fix/default-widget-null-guards
Open

PlayerList: guard default_widget against null before MPRIS events#330
eltictacdicta wants to merge 2 commits into
elementary:mainfrom
eltictacdicta:fix/default-widget-null-guards

Conversation

@eltictacdicta

Copy link
Copy Markdown

default_widget is only created when the sound indicator popover is opened, but MPRIS/DBus scanning starts at session start. When a media player appears before the popover has been opened, add_iface() and destroy_iface() access default_widget while it is still null, causing a wingpanel crash.

Fixes #324

default_widget is only created when the sound indicator popover is opened,
but MPRIS/DBus scanning starts at session start. When a media player appears
before the popover has been opened, add_iface() and destroy_iface() access
default_widget while it is still null, causing a wingpanel crash.

Fixes elementary#324
Comment thread src/Widgets/PlayerList.vala Outdated
Comment thread src/Widgets/PlayerList.vala Outdated
@jeremypw

jeremypw commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Thanks for your first contribution and for finding the cause of this issue!

@jeremypw jeremypw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot reproduce the issue on my machine anyway but these changes seem sane and do not introduce any regressions.

@eltictacdicta

Copy link
Copy Markdown
Author

I cannot reproduce the issue on my machine anyway but these changes seem sane and do not introduce any regressions.

Thanks for approving! For what it's worth, this was actually the only reliably reproducible crash I had — I documented it in #324. In my case it happened specifically when adjusting the volume while YouTube was open in Brave (I believe Chrome triggers it too, since they share the same underlying engine). After building with these changes, I haven't been able to reproduce the crash anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: libsound.so still crashes Wingpanel on audio activity (eOS 8.1, Wayland and X11)

2 participants