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 null context issue in CommonsDaggerSupportFragment #6218

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rohit9625
Copy link
Contributor

Description (required)

Fixes #6208

What changes did you make and why?
The override of the context getter in CommonsDaggerSupportFragment was throwing IllegalStateException when trying to access context. Eg:- if(context == null) can also throw an exception in run-time.

So, I removed the getter and refactored the code using this context because getContext() should return null and we check the context before using it.

Tests performed (required)

Tested prodDebug on Samsung A14 with API level 34.

Screenshots (for UI changes only)
None

Refactored related code to resolve build issues
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.

Crash in main: IllegalStateException: Context is null
1 participant