diff options
author | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2016-06-30 14:44:04 +0200 |
---|---|---|
committer | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2016-06-30 14:44:04 +0200 |
commit | 967a0f646db5bbd802e7ee562ef1891078b51c10 (patch) | |
tree | 83a88e25a2a0d23573fbddbcaad307c5c12cd166 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java | |
parent | ed6382d02cb8a241234574400a1f6a5a31d87796 (diff) | |
download | pdf-over-967a0f646db5bbd802e7ee562ef1891078b51c10.tar.gz pdf-over-967a0f646db5bbd802e7ee562ef1891078b51c10.tar.bz2 pdf-over-967a0f646db5bbd802e7ee562ef1891078b51c10.zip |
Fail safety
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java | 4 |
1 files changed, 4 insertions, 0 deletions
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 264ccd2f..34c1112f 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 @@ -198,6 +198,8 @@ public class SignaturePanel extends JPanel { * @return signature x coordinate */ public float getSignaturePositionX() { + if (this.sigPagePos == null) + return 0; return Math.max((float) this.sigPagePos.getX(), 0); } @@ -206,6 +208,8 @@ public class SignaturePanel extends JPanel { * @return signature y coordinate */ public float getSignaturePositionY() { + if (this.sigPagePos == null) + return 0; return Math.max((float) this.sigPagePos.getY(), 0); } |