Fix NPE when Drawable.getCurrent returns null#2545
Merged
aleksandr-gringauz merged 1 commit intoMar 13, 2025
Merged
Conversation
aleksandr-gringauz
marked this pull request as ready for review
March 13, 2025 17:05
0xnm
approved these changes
Mar 13, 2025
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/2.19.0 #2545 +/- ##
==================================================
+ Coverage 70.03% 70.07% +0.04%
==================================================
Files 797 797
Lines 29994 30040 +46
Branches 5016 5029 +13
==================================================
+ Hits 21005 21049 +44
+ Misses 7598 7588 -10
- Partials 1391 1403 +12
🚀 New features to boost your workflow:
|
aleksandr-gringauz
deleted the
aleksandr-gringauz/fix-npe-drawable-current-release
branch
March 13, 2025 18:10
4 tasks
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.
What does this PR do?
LegacyDrawableToColorMapper.mapDrawableToColorcan crash with NPE when invoked on aStateListDrawable, whosegetCurrent()method returnsnull. This can happen when<selector>doesn't contain the default item.demo [internal]
https://mobile-integration.datadoghq.com/rum/replay/sessions/de3b1c36-f346-4733-abdf-d295f21b99e4?seed=31a96bad-0d88-4292-8e2f-9dd615cadab4&ts=1741884288920
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)