mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-05 04:25:29 -04:00
Minor fix for possible NPE
This commit is contained in:
parent
f3749b8fc6
commit
44530d4717
@ -93,7 +93,7 @@ public final class TIFFImageWriteParam extends ImageWriteParam {
|
|||||||
|
|
||||||
static int getCompressionType(final ImageWriteParam param) {
|
static int getCompressionType(final ImageWriteParam param) {
|
||||||
// TODO: Support mode COPY_FROM_METADATA (when we have metadata...)
|
// TODO: Support mode COPY_FROM_METADATA (when we have metadata...)
|
||||||
if (param == null || param.getCompressionMode() != MODE_EXPLICIT || param.getCompressionType().equals("None")) {
|
if (param == null || param.getCompressionMode() != MODE_EXPLICIT || param.getCompressionType() == null || param.getCompressionType().equals("None")) {
|
||||||
return TIFFBaseline.COMPRESSION_NONE;
|
return TIFFBaseline.COMPRESSION_NONE;
|
||||||
}
|
}
|
||||||
else if (param.getCompressionType().equals("PackBits")) {
|
else if (param.getCompressionType().equals("PackBits")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user