Bug 63200 - [PATCH] Fix rare NPE on getFillPaint
Summary: [PATCH] Fix rare NPE on getFillPaint
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 4.0.x-dev
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2019-02-22 14:41 UTC by Mate Borcsok
Modified: 2019-03-02 12:29 UTC (History)
0 users

test-data/slideshow/gradient-fill-in-group.pptx (35.92 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-02-22 14:41 UTC, Mate Borcsok
test case and fix for bug63200 (5.27 KB, patch)
2019-02-22 14:42 UTC, Mate Borcsok
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mate Borcsok 2019-02-22 14:41:01 UTC
Created attachment 36452 [details]

I found an edge case where calling getFillColor on a shape which calls getFillPaint throws a NullPointerException.
The fill of the shape is gradient fill, but the CTGradientStopList is null.

Attached example pptx, test case, and the fix.
Comment 1 Mate Borcsok 2019-02-22 14:42:58 UTC
Created attachment 36453 [details]
test case and fix for bug63200
Comment 2 Dominik Stadler 2019-03-02 12:29:56 UTC
Thanks for the patch, applied via r1854639 with some more changes that were visible in our integration-tests via this sample file.