Revision: 7355
Author: victormote
Date: 2006-06-02 08:46:20 -0700 (Fri, 02 Jun 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7355&view=rev
Log Message:
-----------
Fix NPE.
Modified Paths:
--------------
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2006-05-31 23:18:47 UTC (rev 7354)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2006-06-02 15:46:20 UTC (rev 7355)
@@ -146,7 +146,12 @@
float fontSize, SVGDocument svgDocument) {
super(textAsShapes);
pdfDoc = doc;
- currentFont = doc.getCurrentGraphicsState().getFont().getFontUse();
+ org.axsl.pdfW.PDFFont pdfFont = doc.getCurrentGraphicsState().getFont();
+ if (pdfFont == null) {
+ this.currentFont = null;
+ } else {
+ this.currentFont = pdfFont.getFontUse();
+ }
currentFontSize = doc.getCurrentGraphicsState().getFontSize();
this.font = font;
this.fontSize = fontSize;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|