Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Fixed a NullPointerException case in the suggest api

luccioman38a3a5e5ada2
diff --git a/htroot/suggest.java b/htroot/suggest.java
index e8867c05a..4d70c37f0 100644
--- a/htroot/suggest.java
+++ b/htroot/suggest.java
@@ -103,7 +103,7 @@ public class suggest {
}
// check for JSONP
- if ( post.containsKey("callback") ) {
+ if (post != null && post.containsKey("callback") ) {
final String jsonp = post.get("callback") + "([";
prop.put("jsonp-start", jsonp);
prop.put("jsonp-end", "])");