浏览代码

Merge pull request #1234 from wangkx/gh-1232

Fix gh-1232 Ecl WU Details crashed when cluster not found

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 13 年之前
父节点
当前提交
520b26fa0b
共有 1 个文件被更改,包括 11 次插入8 次删除
  1. 11 8
      esp/services/ws_workunits/ws_workunitsHelpers.cpp

+ 11 - 8
esp/services/ws_workunits/ws_workunitsHelpers.cpp

@@ -880,15 +880,18 @@ bool WsWuInfo::getClusterInfo(IEspECLWorkunit &info, unsigned flags)
             throw MakeStringException(ECLWATCH_CANNOT_CONNECT_DALI,"Cannot connect to DALI server.");
 
         Owned<IConstWUClusterInfo> clusterInfo = getTargetClusterInfo(clusterName.str());
-        ClusterType platform = clusterInfo->getPlatform();
-        if (isThorCluster(platform))
-        {
-            clusterTypeFlag=1;
-            if (version > 1.29)
-                info.setThorLCR(ThorLCRCluster == platform);
+        if (clusterInfo.get())
+        {//Set thor flag or roxie flag in order to display some options for thor or roxie
+            ClusterType platform = clusterInfo->getPlatform();
+            if (isThorCluster(platform))
+            {
+                clusterTypeFlag=1;
+                if (version > 1.29)
+                    info.setThorLCR(ThorLCRCluster == platform);
+            }
+            else if (RoxieCluster == platform)
+                clusterTypeFlag=2;
         }
-        else if (RoxieCluster == platform)
-            clusterTypeFlag=2;
         info.setClusterFlag(clusterTypeFlag);
     }
     return true;