Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not try to strcmp a variable that may be a null-pointer #3266

Merged
merged 2 commits into from
May 14, 2024
Merged

Do not try to strcmp a variable that may be a null-pointer #3266

merged 2 commits into from
May 14, 2024

Conversation

luttermann
Copy link
Contributor

If a UPower device (such as a wireless mouse/keyboard) is removed UPower::getUpDeviceInfo() will succeeded, but the struct will be filled with null values, and then the std::strcmp will fail! A simple nullptr check will avoid this.

@Alexays Alexays merged commit 912d0e8 into Alexays:master May 14, 2024
8 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