瀏覽代碼

HPCC-22084 WU with no workflow stats causing crashes

Signed-off-by: Shamser Ahmed <shamser.ahmed@lexisnexis.co.uk>
Shamser Ahmed 6 年之前
父節點
當前提交
5c6a16b5ab
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      common/workunit/workunit.cpp

+ 6 - 2
common/workunit/workunit.cpp

@@ -8615,8 +8615,12 @@ IConstWUScopeIterator & CLocalWorkUnit::getScopeIterator(const WuScopeFilter & f
 
     if (sources & SSFsearchWorkflow)
     {
-        Owned<IConstWUScopeIterator> workflowIter(new WorkflowStatisticsScopeIterator(getWorkflowItems()));
-        compoundIter->addIter(workflowIter);
+        Owned<IConstWorkflowItemIterator> iter = getWorkflowItems();
+        if (iter)
+        {
+            Owned<IConstWUScopeIterator> workflowIter(new WorkflowStatisticsScopeIterator(iter));
+            compoundIter->addIter(workflowIter);
+        }
     }