8221411: NullPointerException in RasterPrinterJob without PrinterResolution
Reviewed-by: prr
This commit is contained in:
parent
3642a0007f
commit
21e9b4d59f
@ -1275,10 +1275,12 @@ public abstract class RasterPrinterJob extends PrinterJob {
|
||||
printerResAttr = (PrinterResolution)
|
||||
service.getDefaultAttributeValue(PrinterResolution.class);
|
||||
}
|
||||
double xr =
|
||||
printerResAttr.getCrossFeedResolution(ResolutionSyntax.DPI);
|
||||
double yr = printerResAttr.getFeedResolution(ResolutionSyntax.DPI);
|
||||
setXYRes(xr, yr);
|
||||
if (printerResAttr != null) {
|
||||
double xr =
|
||||
printerResAttr.getCrossFeedResolution(ResolutionSyntax.DPI);
|
||||
double yr = printerResAttr.getFeedResolution(ResolutionSyntax.DPI);
|
||||
setXYRes(xr, yr);
|
||||
}
|
||||
}
|
||||
|
||||
pageRangesAttr = (PageRanges)attributes.get(PageRanges.class);
|
||||
|
Loading…
x
Reference in New Issue
Block a user