Project

General

Profile

« Previous | Next » 

Revision e701bdea

Added by Patrick Plitzner over 7 years ago

Fix potential NPE

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPart.java
39 39
import eu.etaxonomy.cdm.api.application.CdmChangeEvent;
40 40
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
41 41
import eu.etaxonomy.cdm.api.application.ICdmChangeListener;
42
import eu.etaxonomy.cdm.api.application.ICdmDataChangeService;
42 43
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
43 44
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
44 45
import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
......
259 260
	    if(cdmEntitySession != null) {
260 261
	        cdmEntitySession.dispose();
261 262
	    }
262
	    CdmApplicationState.getCurrentDataChangeService().unregister(this);
263
	    ICdmDataChangeService currentDataChangeService = CdmApplicationState.getCurrentDataChangeService();
264
	    if(currentDataChangeService!=null){
265
	        currentDataChangeService.unregister(this);
266
	    }
263 267
		super.dispose();
264 268
	}
265 269

  

Also available in: Unified diff