diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2014-02-03 16:15:02 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2014-02-03 16:15:02 +0000 |
commit | 7c460dbf79469a27f1c8bd289d05b5544b7d1221 (patch) | |
tree | 33439fc0956aa93667d64acd8994886b74efd1d0 | |
parent | de48366a43634801892aa08244d75cdf82bbcdeb (diff) | |
download | pdf-over-7c460dbf79469a27f1c8bd289d05b5544b7d1221.tar.gz pdf-over-7c460dbf79469a27f1c8bd289d05b5544b7d1221.tar.bz2 pdf-over-7c460dbf79469a27f1c8bd289d05b5544b7d1221.zip |
NULL checks
PDFOVER-1 #done Fixed #resolve
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@509 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java | 3 | ||||
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java index 9c649f1c..8f90cd78 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java @@ -423,7 +423,8 @@ public class PositioningComposite extends StateComposite { */ public void setPosition(float x, float y, int page) { showPage(page); - this.viewer.setSignaturePosition(x, y); + if (this.viewer != null) + this.viewer.setSignaturePosition(x, y); } /** diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java index b4933cb2..264ccd2f 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java @@ -335,9 +335,10 @@ public class SignaturePanel extends JPanel { } else { if ( - (this.sigScreenWidth != this.prevSigScreenWidth) || + ((this.sigScreenWidth != this.prevSigScreenWidth) || (this.sigScreenHeight != this.prevSigScreenHeight) || - (this.sigPlaceholderTransparency != this.prevSigPlaceholderTransparency)) + (this.sigPlaceholderTransparency != this.prevSigPlaceholderTransparency)) && + ((this.sigScreenWidth != 0) && (this.sigScreenHeight != 0))) { // redraw scaled transparent placeholder this.prevSigScreenWidth = this.sigScreenWidth; |