fixed two regressions (NPE) caused by previous commit
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java
index b3c35eb..2d98504 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java
@@ -222,7 +222,7 @@
 		}
 	}
 	// SMAP-related position mapping may produce positions outside the file, crop them now:
-	if (problemStartPosition > unitResult.sourceEndPos) {
+	if (unitResult != null && problemStartPosition > unitResult.sourceEndPos) {
 		problemStartPosition = 0;
 		problemEndPosition = 0;
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/MethodModel.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/MethodModel.java
index ba448b4..1942012 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/MethodModel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/MethodModel.java
@@ -773,6 +773,8 @@
 														  RoleModel sourceRoleModel,
 														  AstGenerator defaultGen) 
 	{
+		if (sourceRoleModel.getAst() == null)
+			return defaultGen; // don't have more detailed source positions
 		MethodModel model = methodDecl.getModel();
 		AstGenerator gen = model.getSynthPosGen(hostTypeDecl, 
 											    sourceRoleModel.getBinding(),