Skip to content

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

fix NPE in Vocabulary_p servlet called w/o parameter

regerf7b0148f6aac
diff --git a/htroot/Vocabulary_p.java b/htroot/Vocabulary_p.java
index 5be72d3c3..14e04092a 100644
--- a/htroot/Vocabulary_p.java
+++ b/htroot/Vocabulary_p.java
@@ -188,7 +188,7 @@ public class Vocabulary_p {
LibraryProvider.autotagging.addVocabulary(newvoc);
vocabularyName = discovername;
vocabulary = newvoc;
- } else {
+ } else if (vocabulary != null) {
// check if objectspace was set
vocabulary.setObjectspace(post.get("objectspace", vocabulary.getObjectspace() == null ? "" : vocabulary.getObjectspace()));
@@ -217,7 +217,7 @@ public class Vocabulary_p {
}
// check if the vocabulary shall be deleted
- if (vocabulary != null && post.get("delete_vocabulary", "").equals("checked") ) {
+ if (post.get("delete_vocabulary", "").equals("checked") ) {
LibraryProvider.autotagging.deleteVocabulary(vocabularyName);
vocabulary = null;
vocabularyName = null;