Explorar o código

ENH: fix depend segfault

Bill Hoffman %!s(int64=25) %!d(string=hai) anos
pai
achega
0adb5237bd
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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.
 // add the depend information from info to the m_Indices varible of this class.
 void cmDependInformation::MergeInfo(cmDependInformation* info)
 void cmDependInformation::MergeInfo(cmDependInformation* info)
 {
 {
+  if(this == info)
+    {
+      return;
+    }
   std::vector<int>::iterator i = info->m_Indices.begin();
   std::vector<int>::iterator i = info->m_Indices.begin();
   for(; i!= info->m_Indices.end(); ++i)
   for(; i!= info->m_Indices.end(); ++i)
     {
     {