You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2016/11/24 16:53:14 UTC
svn commit: r1771189 -
/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/form/PDTransparencyGroupAttributes.java
Author: tilman
Date: Thu Nov 24 16:53:13 2016
New Revision: 1771189
URL: http://svn.apache.org/viewvc?rev=1771189&view=rev
Log:
PDFBOX-3000: avoid calling PDColorSpace.create() with null
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/form/PDTransparencyGroupAttributes.java
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/form/PDTransparencyGroupAttributes.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/form/PDTransparencyGroupAttributes.java?rev=1771189&r1=1771188&r2=1771189&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/form/PDTransparencyGroupAttributes.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/form/PDTransparencyGroupAttributes.java Thu Nov 24 16:53:13 2016
@@ -58,13 +58,14 @@ public final class PDTransparencyGroupAt
}
/**
- * Returns the blending color space
- * @return color space
+ * Returns the group color space or null if it isn't defined.
+ *
+ * @return the group color space.
* @throws IOException
*/
public PDColorSpace getColorSpace() throws IOException
{
- if (colorSpace == null)
+ if (colorSpace == null && getCOSObject().containsKey(COSName.CS))
{
colorSpace = PDColorSpace.create(getCOSObject().getDictionaryObject(COSName.CS));
}