fix: Prevent crash when no CastContext shared instance found#1015
Merged
theovilardo merged 2 commits intotheovilardo:masterfrom Feb 9, 2026
Merged
Conversation
Owner
|
Hi! This is very helpful for a lot of users, but I'm currently fixing bugs on the Cast state Holder, could you rebase on the latest commit on master branch so this can be added? |
Contributor
Author
|
@theovilardo this is already up to date I believe! Let me know if I am wrong |
Owner
|
Do you have the commit number you based the branch of?
|
Contributor
Author
d1d02fb |
Contributor
Author
|
@theovilardo according to the repo that is the newest commit unless I am in looking in the wrong place. |
Owner
|
Perfect
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
When CastContext is called for its shared instance, it does not properly handle the instance in which a user does not have proper Google Play Dependencies.
Solution
Ensures that if a user does not have this Google Play Dependency available (like on my HiBy M500), instead of crashing, the app simply does not cast when selecting a destination.
From what I can tell the rest of the application seems to work fine, and I can even pull up the cast sheet and shows devices, it just results in nothing happening when casting to devices.
Notes
I think this should be fine as it allows those without Google Play Services to still launch and use the app as is, but because they don't have the needed services they simply cannot use the app fully.
Further checks can be added in the future that can indicate to the user that they cannot cast due to not having Play services, but for now (at least for me) this solution should be alright.
(Personally I just wanted this so I could use this app on my HiBy M500 and still be able to update in the future, so I am hoping this can be merged in)
This should resolve #436