skip extension if toolkit instantiation failed, bug 352856
diff --git a/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/core/DLTKLanguageManager.java b/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/core/DLTKLanguageManager.java
index c361372..783b2c4 100644
--- a/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/core/DLTKLanguageManager.java
+++ b/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/core/DLTKLanguageManager.java
@@ -64,6 +64,11 @@
 		for (int j = 0; j < elementInfos.length; j++) {
 			IDLTKLanguageToolkit toolkit = (IDLTKLanguageToolkit) toolkitManager
 					.getInitObject(elementInfos[j]);
+			if (toolkit == null) {
+				// toolkit instantiation failed, skip it
+				// TODO (alex) remove this ElementInfo entry
+				continue;
+			}
 			if (object instanceof IResource) {
 				if (DLTKContentTypeManager.isValidResourceForContentType(
 						toolkit, (IResource) object)) {