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

Fix crash when building the play queue audio track menu if the player is null #10577

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

AudricV
Copy link
Member

@AudricV AudricV commented Nov 15, 2023

What is it?

  • Bugfix (user facing)

Description of the changes in your PR

This PR fixes a crash when building the play queue audio track menu if the player is null.

It makes sure that the player is not null, by using Optionals on the player itself instead of its methods returning Optionals.

If the player is null, the play queue audio track menu will now be hidden instead of crashing the app.

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

… is null

As the player can be null in some cases, we have to make sure that the player
is not null, by using Optionals on the player itself instead of its methods
returning Optionals.

If the player is null, the play queue audio track menu will now be hidden.
@AudricV AudricV added bug Issue is related to a bug GUI Issue is related to the graphical user interface labels Nov 15, 2023
Copy link

sonarcloud bot commented Nov 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Stypox Stypox merged commit 3dc593f into TeamNewPipe:dev Nov 16, 2023
8 of 10 checks passed
@AudricV AudricV deleted the fix-npe-play-queue-audio-track-menu branch November 16, 2023 08:21
@Stypox Stypox mentioned this pull request Nov 16, 2023
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug GUI Issue is related to the graphical user interface
Projects
None yet
2 participants