]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
fixed bug that caused null pointer exception on those block areas that had a null...
authorjtauber <jtauber@unknown>
Mon, 29 Nov 1999 05:59:49 +0000 (05:59 +0000)
committerjtauber <jtauber@unknown>
Mon, 29 Nov 1999 05:59:49 +0000 (05:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193250 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/render/pdf/PDFRenderer.java

index e9ef2b6c84415e3cf37edb0faa72b0d219355765..276233f36395ec288d2e6b58f7a34ed2b145be81 100644 (file)
@@ -237,7 +237,9 @@ public class PDFRenderer implements Renderer {
        int w = area.getContentWidth();
        int h = area.getHeight();
        ColorType bg = area.getBackgroundColor();
-       if (bg.alpha() == 0) {
+       // I'm not sure I should have to check for bg being null
+       // but I do
+       if ((bg != null) && (bg.alpha() == 0)) {
            this.addRect(rx, ry, w, -h,
                         bg.red(), bg.green(), bg.blue(),
                         bg.red(), bg.green(), bg.blue());