Project

General

Profile

« Previous | Next » 

Revision 1749b4af

Added by Katja Luther over 5 years ago

ref #7854: avoid NPE

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImpl.java
1053 1053
               true, true, propertyPaths);
1054 1054
        List<TaxonDistributionDTO> result = new ArrayList<>();
1055 1055
        for(TaxonNode node:nodes){
1056
            TaxonDistributionDTO dto = new TaxonDistributionDTO(node.getTaxon());
1057
            result.add(dto);
1056
            if (node.getTaxon() != null){
1057
                TaxonDistributionDTO dto = new TaxonDistributionDTO(node.getTaxon());
1058
                result.add(dto);
1059
            }
1060

  
1058 1061
        }
1059 1062

  
1060 1063
        return result;

Also available in: Unified diff