Quickfix for a non critical problem that surfaces when changing an accepted taxon...
authorn.hoffmann <n.hoffmann@localhost>
Wed, 7 Sep 2011 09:35:02 +0000 (09:35 +0000)
committern.hoffmann <n.hoffmann@localhost>
Wed, 7 Sep 2011 09:35:02 +0000 (09:35 +0000)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaContentProvider.java

index 184e01da7e6244f567e84fb180786c665dafe9cd..94643dbcc4486a519126626debeae623b8940e35 100644 (file)
@@ -46,6 +46,10 @@ public class MediaContentProvider implements ITreeContentProvider{
                                
                if (parentElement instanceof TaxonEditorInput) {
                        Taxon taxon = ((TaxonEditorInput) parentElement).getTaxon();
+                       if(taxon == null){
+                               EditorUtil.error(getClass(), "Taxon is null", null);
+                               return NO_CHILDREN;
+                       }
                        HashSet<DescriptionBase> imageGalleries = new HashSet<DescriptionBase>();
                        for(DescriptionBase description : taxon.getDescriptions()){
                                if(description.isImageGallery()){