OSDN Git Service

Fix issue #1363: Crash on command line compare
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Tue, 7 Jun 2022 13:14:47 +0000 (22:14 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Tue, 7 Jun 2022 13:14:47 +0000 (22:14 +0900)
Src/MergeDoc.cpp

index 1247e34..ba81496 100644 (file)
@@ -1088,6 +1088,8 @@ static std::pair<MergeResult, Type> DoMergeValue(Type left, Type middle, Type ri
  */
 void CMergeDoc::DoAutoMerge(int dstPane)
 {
+       if (m_nBuffers < 3)
+               return;
        const int lastDiff = m_diffList.GetSize() - 1;
        const int firstDiff = 0;
        bool bGroupWithPrevious = false;