From: Patrick Plitzner
Date: Tue, 6 Aug 2019 09:54:56 +0000 (+0200)
Subject: Fix potential NPE
X-Git-Tag: 5.9.0^2~99
X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/50cf49ac265ea8af5e90104743e9b1d0a14883af
Fix potential NPE
---
diff --git a/eu.etaxonomy.taxeditor.workbench/src/main/java/eu/etaxonomy/taxeditor/workbench/SaveHandler.java b/eu.etaxonomy.taxeditor.workbench/src/main/java/eu/etaxonomy/taxeditor/workbench/SaveHandler.java
index ccb7eaa1c..fcb3e720a 100644
--- a/eu.etaxonomy.taxeditor.workbench/src/main/java/eu/etaxonomy/taxeditor/workbench/SaveHandler.java
+++ b/eu.etaxonomy.taxeditor.workbench/src/main/java/eu/etaxonomy/taxeditor/workbench/SaveHandler.java
@@ -23,7 +23,9 @@ public class SaveHandler {
if(!isSavable){
if(activePart.getObject() instanceof ISelectionElementEditingPart){
MPart savablePart = WorkbenchUtility.findSavablePart((ISelectionElementEditingPart) activePart.getObject());
- isSavable = savablePart.isDirty();
+ if(savablePart!=null){
+ isSavable = savablePart.isDirty();
+ }
}
}
return isSavable;