ref #7998 fix potential NPE
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / dialog / selection / TermVocabularySelectionDialog.java
index a71532ee96f735d5cd6acb34738f0e0f1c04b5ca..589a37f7770bf3cc7fb79d697a6ef6bea731b75d 100644 (file)
@@ -39,11 +39,11 @@ public class TermVocabularySelectionDialog extends
     }
 
     public static TermVocabulary select(String dialogTitle, Shell shell, TermVocabulary voc){
-        return select_internal(dialogTitle, shell, Collections.singleton(voc), null);
+        return select_internal(dialogTitle, shell, voc!=null?Collections.singleton(voc):null, null);
     }
 
     public static TermVocabulary select(Shell shell, TermVocabulary voc){
-        return select_internal("Choose Vocabulary", shell, Collections.singleton(voc), null);
+        return select_internal("Choose Vocabulary", shell, voc!=null?Collections.singleton(voc):null, null);
     }
 
     private static TermVocabulary select_internal(String dialogTitle, Shell shell, Set<TermVocabulary> vocabulariesToBeFiltered,