Project

General

Profile

« Previous | Next » 

Revision b310b0b0

Added by Patrick Plitzner over 8 years ago

Fix possible NPE

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
491 491
                    }
492 492
                }
493 493
            }
494
            Collection<SpecimenOrObservationBase> fieldUnits = CdmStore.getService(IOccurrenceService.class).listFieldUnitsByAssociatedTaxon(selectedTaxon, null, null);
495
            Collection<UUID> uuids = new HashSet<UUID>();
496
            for (SpecimenOrObservationBase specimenOrObservationBase : fieldUnits) {
497
                uuids.add(specimenOrObservationBase.getUuid());
494
            if(selectedTaxon!=null){
495
                Collection<SpecimenOrObservationBase> fieldUnits = CdmStore.getService(IOccurrenceService.class).listFieldUnitsByAssociatedTaxon(selectedTaxon, null, null);
496
                Collection<UUID> uuids = new HashSet<UUID>();
497
                for (SpecimenOrObservationBase specimenOrObservationBase : fieldUnits) {
498
                    uuids.add(specimenOrObservationBase.getUuid());
499
                }
500
                updateRootEntities(uuids);
501
                setPartName("Derivative Editor: " + selectedTaxon.getName());
498 502
            }
499
            updateRootEntities(uuids);
500
            setPartName("Derivative Editor: " + selectedTaxon.getName());
501 503
        }
502 504
    }
503 505

  

Also available in: Unified diff