Explorar el Código

Merge pull request #11355 from richardkchapman/hpcc19951

HPCC-19951 Core using compile-time file resolution with eclserver/legacy

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday hace 7 años
padre
commit
b4b11fd38d
Se han modificado 1 ficheros con 11 adiciones y 8 borrados
  1. 11 8
      ecl/hql/hqlrepository.cpp

+ 11 - 8
ecl/hql/hqlrepository.cpp

@@ -73,15 +73,18 @@ void getImplicitScopes(HqlScopeArray& implicitScopes, IEclRepository * repositor
 extern HQL_API void importRootModulesToScope(IHqlScope * scope, HqlLookupContext & ctx)
 {
     IEclRepository * eclRepository = ctx.queryRepository();
-    HqlScopeArray rootScopes;
-    getRootScopes(rootScopes, eclRepository, ctx);
-    ForEachItemIn(i, rootScopes)
+    if (eclRepository)
     {
-        IHqlScope & cur = rootScopes.item(i);
-        IIdAtom * curName = cur.queryId();
-        OwnedHqlExpr resolved = eclRepository->queryRootScope()->lookupSymbol(curName, LSFpublic, ctx);
-        if (resolved)
-            scope->defineSymbol(curName, NULL, resolved.getClear(), false, true, ob_import);
+        HqlScopeArray rootScopes;
+        getRootScopes(rootScopes, eclRepository, ctx);
+        ForEachItemIn(i, rootScopes)
+        {
+            IHqlScope & cur = rootScopes.item(i);
+            IIdAtom * curName = cur.queryId();
+            OwnedHqlExpr resolved = eclRepository->queryRootScope()->lookupSymbol(curName, LSFpublic, ctx);
+            if (resolved)
+                scope->defineSymbol(curName, NULL, resolved.getClear(), false, true, ob_import);
+        }
     }
 }