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

Corner case bug - gradient radius 0 on Android SDK 31+ leads to NullPointerException #259

Open
attilatanyi opened this issue Aug 21, 2022 · 1 comment
Assignees
Labels
Milestone

Comments

@attilatanyi
Copy link

Describe the bug
In this line in SVGAndroidRenderer, if SUPPORTS_RADIAL_GRADIENT_WITH_FOCUS is true (we're on Android SDK 31 or above), then the colours array will be null, which will throw a NullPointerException.

To Reproduce
I've found this when checking the code, so haven't reproduced this in practice, but in theory it would be:

  1. Render an SVG that contains a radial gradient with radius 0, on Android 31 or above

Expected behavior
2. Rendering works

Stack traces

SVG file

Screenshots

Device

  • Android SDK 31 or above

Additional context

@BigBadaboom BigBadaboom self-assigned this Aug 22, 2022
@BigBadaboom BigBadaboom added this to the 1.5 milestone Aug 22, 2022
@BigBadaboom
Copy link
Owner

Yes. You are right. Good spot. Thanks vm for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants