浏览代码

Merge pull request #8355 from garonsky/HPCC-15171_fix_warn

HPCC-15171 Fix compilation warning

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 年之前
父节点
当前提交
aa11b1b04c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      esp/services/WsDeploy/WsDeployService.cpp

+ 2 - 2
esp/services/WsDeploy/WsDeployService.cpp

@@ -4197,7 +4197,7 @@ bool CWsDeployFileInfo::handleHardwareCopy(IPropertyTree *pComponents, IProperty
 {
     bool bWrite = false;
     StringBuffer filePath;
-    IPropertyTree* dupTree;
+    IPropertyTree* dupTree = NULL;
 
     Owned<IPropertyTreeIterator> iterComp = pComponents->getElements("*");
 
@@ -4249,7 +4249,7 @@ bool CWsDeployFileInfo::handleHardwareCopy(IPropertyTree *pComponents, IProperty
     }
     else
     {
-        VStringBuffer err("Copy failed. Element %s may already exist in the target configuration.", dupTree->queryProp(XML_ATTR_NAME));
+        VStringBuffer err("Copy failed. Element %s may already exist in the target configuration.", dupTree ? dupTree->queryProp(XML_ATTR_NAME) : "");
         throw MakeStringException(-1, "%s", err.str());
     }
     return true;