diff --git a/src/org/rascalmpl/uri/URIResolverRegistry.java b/src/org/rascalmpl/uri/URIResolverRegistry.java index 258fc34dd9c..9051eb8c764 100644 --- a/src/org/rascalmpl/uri/URIResolverRegistry.java +++ b/src/org/rascalmpl/uri/URIResolverRegistry.java @@ -402,9 +402,10 @@ private ISourceLocation physicalLocation(ISourceLocation loc) throws IOException ILogicalSourceLocationResolver resolver = map.get(auth); loc = resolveAndFixOffsets(loc, resolver, map.values()); } - var fallBack = fallbackLogicalResolver; - if (fallBack != null) { - return resolveAndFixOffsets(loc == null ? original : loc, fallBack, Collections.emptyList()); + + if (fallbackLogicalResolver != null) { + var fallbackResult = resolveAndFixOffsets(loc == null ? original : loc, fallbackLogicalResolver, Collections.emptyList()); + return fallbackResult == null ? loc : fallbackResult; } return loc; }