FIX NPE
diff --git a/plugins/org.eclipse.ldt/src/org/eclipse/ldt/core/internal/ast/models/LuaASTUtils.java b/plugins/org.eclipse.ldt/src/org/eclipse/ldt/core/internal/ast/models/LuaASTUtils.java
index a47331f..f133f26 100644
--- a/plugins/org.eclipse.ldt/src/org/eclipse/ldt/core/internal/ast/models/LuaASTUtils.java
+++ b/plugins/org.eclipse.ldt/src/org/eclipse/ldt/core/internal/ast/models/LuaASTUtils.java
@@ -460,7 +460,7 @@
 	}
 
 	private static Definition getDefinition(TypeResolution recordTypeResolution, String fieldname, Set<TypeResolution> cache) {
-		if (recordTypeResolution.getTypeDef() instanceof RecordTypeDef) {
+		if (recordTypeResolution != null && recordTypeResolution.getTypeDef() instanceof RecordTypeDef) {
 			// search field with the given field name
 			RecordTypeDef recordtypedef = (RecordTypeDef) recordTypeResolution.getTypeDef();
 			Item item = recordtypedef.getFields().get(fieldname);