Project

General

Profile

Revision 48af2464

ID48af246435f7111dafa1d1ad8f2d007a9dc88014
Parent e34c0af1
Child 9f70389a

Added by Patrick Plitzner almost 3 years ago

ref #6595 Fix NPE when opening orphaned taxon

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
89 89

  
90 90
    private static void openNameEditor_internal(TaxonEditorInputE4 input) {
91 91
        TaxonBase taxonBase = input.getTaxon();
92

  
93
        if (taxonBase != null && taxonBase.isOrphaned()) {
92
        if(taxonBase==null){
93
            return;
94
        }
95
        if (taxonBase.isOrphaned()) {
94 96
            if(taxonBase.isInstanceOf(Synonym.class)){
95 97
                MessagingUtils.warningDialog(Messages.EditorUtil_ORPHAN_ACCEPTED_TAXON, TaxonEditorInputE4.class, Messages.EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE);
96 98
                return;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/TaxonEditorInputE4.java
271 271
    }
272 272

  
273 273
    public Taxon getTaxon(){
274
        Taxon taxon = CdmBase.deproxy(taxonNode.getTaxon(), Taxon.class);
275
        return taxon;
274
        if(taxonNode!=null){
275
            Taxon taxon = CdmBase.deproxy(taxonNode.getTaxon(), Taxon.class);
276
            return taxon;
277
        }
278
        return null;
276 279
    }
277 280

  
278 281
    public TaxonNode getTaxonNode() {

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)