瀏覽代碼

ENH: fix depend segfault

Bill Hoffman 25 年之前
父節點
當前提交
0adb5237bd
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Source/cmMakeDepend.cxx

+ 4 - 0
Source/cmMakeDepend.cxx

@@ -241,6 +241,10 @@ void cmDependInformation::RemoveDuplicateIndices()
 // add the depend information from info to the m_Indices varible of this class.
 void cmDependInformation::MergeInfo(cmDependInformation* info)
 {
+  if(this == info)
+    {
+      return;
+    }
   std::vector<int>::iterator i = info->m_Indices.begin();
   for(; i!= info->m_Indices.end(); ++i)
     {