mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
Avoid NPE when handling color-highlighting in text-runs
This commit is contained in:
parent
18ef01295d
commit
8cdcda2873
@ -191,6 +191,10 @@ public class XSLFTextRun implements TextRun, HighlightColorSupport {
|
||||
}
|
||||
|
||||
final CTSRgbColor rgbCol = col.getSrgbClr();
|
||||
if (rgbCol == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final byte[] cols = rgbCol.getVal();
|
||||
final SolidPaint paint = DrawPaint.createSolidPaint(new Color(0xFF & cols[0], 0xFF & cols[1], 0xFF & cols[2]));
|
||||
highlightColor.accept(paint);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user