diff --git a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/IGlobalServiceProvider.java b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/IGlobalServiceProvider.java
index <HASH>..<HASH> 100644
--- a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/IGlobalServiceProvider.java
+++ b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/IGlobalServiceProvider.java
@@ -10,6 +10,7 @@ package org.eclipse.xtext.resource;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
 
 import com.google.inject.ImplementedBy;
 import com.google.inject.Inject;
@@ -56,8 +57,11 @@ public interface IGlobalServiceProvider {
 			if (eObject.eIsProxy()) {
 				return findService(((InternalEObject)eObject).eProxyURI(),serviceClazz);
 			} else {
-				return findService(eObject.eResource().getURI(),serviceClazz);
+				Resource eResource = eObject.eResource();
+				if(eResource != null)
+					return findService(eResource.getURI(),serviceClazz);
 			}
+			return null;
 		}
 		
 	}
[grammar][codeassist] Reworked feature proposals