Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix NPE in viewimage
regerd72938678776
diff --git a/htroot/ViewImage.java b/htroot/ViewImage.javaindex eed6dfc33..d07cfae3c 100644--- a/htroot/ViewImage.java+++ b/htroot/ViewImage.java@@ -152,9 +152,11 @@ public class ViewImage {// read imageimage = ImageParser.parse(urlString, imgb);-- if (image == null || (auth && (width == 0 || height == 0) && maxwidth == 0 && maxheight == 0)) return ext == null ? image : new EncodedImage(image, ext, isStatic);-+ if (image == null) {+ return null;+ } else {+ if ((auth && (width == 0 || height == 0) && maxwidth == 0 && maxheight == 0)) return ext == null ? image : new EncodedImage(image, ext, isStatic);+ }// find original sizefinal int h = image.getHeight(null);final int w = image.getWidth(null);