Bug 466953 - NullPointerException in ConfigurationProvider.dispose

Change-Id: I15d51b8a9c0d21d3a8e03550bca3d0dc40c6ff00
diff --git a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/config/ConfigurationProvider.java b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/config/ConfigurationProvider.java
index 7eee88c..db050ae 100644
--- a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/config/ConfigurationProvider.java
+++ b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/config/ConfigurationProvider.java
@@ -1,7 +1,7 @@
 /*******************************************************************************
  * <copyright>
  *
- * Copyright (c) 2005, 2012 SAP AG.
+ * Copyright (c) 2005, 2015 SAP AG.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
  *    SAP AG - initial API, implementation and documentation
  *    Bug 336488 - DiagramEditor API
  *    pjpaulin - Bug 352120 - Now uses IDiagramContainerUI interface
+ *    mwenz - Bug 466953 - NullPointerException in ConfigurationProvider.dispose
  *
  * </copyright>
  *
@@ -83,7 +84,10 @@
 			resourceRegistry.dispose();
 		}
 
-		getDiagramTypeProvider().dispose();
+		IDiagramTypeProvider diagramTypeProviderToDispose = getDiagramTypeProvider();
+		if (diagramTypeProviderToDispose != null) {
+			diagramTypeProviderToDispose.dispose();
+		}
 	}
 
 	/*