Skip to content

Commit

Permalink
fix FindNonAlphaPngTask NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
williamjin authored and felixzhou committed Jan 3, 2019
1 parent 36afa0a commit 951df47
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void findNonAlphaPng(File file) throws IOException {
}
} else if (file.isFile() && file.getName().endsWith(ApkConstants.PNG_FILE_SUFFIX) && !file.getName().endsWith(ApkConstants.NINE_PNG)) {
BufferedImage bufferedImage = ImageIO.read(file);
if (!bufferedImage.getColorModel().hasAlpha()) {
if (bufferedImage != null && bufferedImage.getColorModel() != null && !bufferedImage.getColorModel().hasAlpha()) {
String filename = file.getAbsolutePath().substring(inputFile.getAbsolutePath().length() + 1);
if (entryNameMap.containsKey(filename)) {
filename = entryNameMap.get(filename);
Expand Down

0 comments on commit 951df47

Please sign in to comment.