small fic to prevent NPE when iterating over shape attributes in HSLF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1299336 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1434c766a3
commit
24d8e515b0
@ -381,10 +381,11 @@ public abstract class Shape {
|
|||||||
boolean fSchemeIndex = (a & (1 << 3)) != 0;
|
boolean fSchemeIndex = (a & (1 << 3)) != 0;
|
||||||
boolean fSysIndex = (a & (1 << 4)) != 0;
|
boolean fSysIndex = (a & (1 << 4)) != 0;
|
||||||
|
|
||||||
if (fSchemeIndex)
|
Sheet sheet = getSheet();
|
||||||
|
if (fSchemeIndex && sheet != null)
|
||||||
{
|
{
|
||||||
//red is the index to the color scheme
|
//red is the index to the color scheme
|
||||||
ColorSchemeAtom ca = getSheet().getColorScheme();
|
ColorSchemeAtom ca = sheet.getColorScheme();
|
||||||
int schemeColor = ca.getColor(r);
|
int schemeColor = ca.getColor(r);
|
||||||
|
|
||||||
r = (schemeColor >> 0) & 0xFF;
|
r = (schemeColor >> 0) & 0xFF;
|
||||||
|
Loading…
Reference in New Issue
Block a user