[prev in list] [next in list] [prev in thread] [next in thread]
List: jedit-cvs
Subject: [ jEdit-commits ] SF.net SVN: jedit:[24578] jEdit/trunk/org/gjt/sp/jedit/print/PrinterDialog. java
From: daleanson () users ! sourceforge ! net
Date: 2016-11-29 2:51:00
Message-ID: E1cBYVc-0005Sk-2i () sfs-ml-2 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 24578
http://sourceforge.net/p/jedit/svn/24578
Author: daleanson
Date: 2016-11-29 02:51:00 +0000 (Tue, 29 Nov 2016)
Log Message:
-----------
Fix for NPE in page ranges in printer dialog.
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/print/PrinterDialog.java
Modified: jEdit/trunk/org/gjt/sp/jedit/print/PrinterDialog.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/print/PrinterDialog.java 2016-11-29 00:42:14 UTC \
(rev 24577)
+++ jEdit/trunk/org/gjt/sp/jedit/print/PrinterDialog.java 2016-11-29 02:51:00 UTC \
(rev 24578) @@ -229,11 +229,12 @@
// adjust the print range to filter based on odd/even pages
PageRanges pr = ( PageRanges )PrinterDialog.this.attributes.get( \
PageRanges.class ); try
-
-
{
- pr = mergeRanges( pr );
- PrinterDialog.this.attributes.add( pr );
+ PageRanges mergedRanges = mergeRanges( pr );
+ if (mergedRanges != null)
+ {
+ PrinterDialog.this.attributes.add( mergedRanges );
+ }
}
catch ( PrintException e )
{
@@ -279,11 +280,12 @@
// adjust the print range to filter based on odd/even pages
PageRanges pr = ( PageRanges )PrinterDialog.this.attributes.get( \
PageRanges.class ); try
-
-
{
- pr = mergeRanges( pr );
- PrinterDialog.this.attributes.add( pr );
+ PageRanges mergedRanges = mergeRanges( pr );
+ if (mergedRanges != null)
+ {
+ PrinterDialog.this.attributes.add( mergedRanges );
+ }
}
catch ( PrintException e )
{
@@ -455,7 +457,7 @@
// setting in the Page Setup tab.
private PageRanges mergeRanges( PageRanges pr ) throws PrintException
{
- if ( onlyPrintPages == ALL )
+ if ( pr == null || onlyPrintPages == ALL )
{
return pr;
}
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
jEdit-CVS mailing list
jEdit-CVS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic