Skip to content

mediakeys.go example: Fix error handling.#433

Merged
guelfey merged 1 commit into
godbus:masterfrom
smu-ggl:patch-1
May 1, 2026
Merged

mediakeys.go example: Fix error handling.#433
guelfey merged 1 commit into
godbus:masterfrom
smu-ggl:patch-1

Conversation

@smu-ggl

@smu-ggl smu-ggl commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

The panic re-uses the err variable defined in line 11 and at this point guaranteed to be nil - instead of using the call.Err just checked by the if. This change fixes that problem.

The panic re-uses the `err` variable defined in line 11 and at this point guaranteed to be nil - instead of using the call.Err just checked by the if. This change fixes that problem.

@guelfey guelfey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@guelfey guelfey merged commit 7914b92 into godbus:master May 1, 2026
12 of 13 checks passed
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.

2 participants