From f7b0148f6aacdf6ba6f5b7bb4a13a69b5f227fab Mon Sep 17 00:00:00 2001 From: reger Date: Mon, 20 Apr 2015 00:01:14 +0200 Subject: [PATCH] fix NPE in Vocabulary_p servlet called w/o parameter --- htroot/Vocabulary_p.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;