Fixed bug in row deletion in policy editor, which can cause console to crash
authorVictor Kirhenshtein <victor@netxms.org>
Thu, 30 Sep 2004 07:07:12 +0000 (07:07 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Thu, 30 Sep 2004 07:07:12 +0000 (07:07 +0000)
src/console/win32/RuleList.cpp

index 9c964d7..4dd1038 100644 (file)
@@ -1320,6 +1320,8 @@ BOOL CRuleList::DeleteRow(int iRow)
 
    if ((iRow >= 0) && (iRow < m_iNumRows))
    {
+      if (iRow == m_iCurrRow)
+         m_iCurrRow = -1;
       delete m_ppRowList[iRow];
       m_iNumRows--;
       memmove(&m_ppRowList[iRow], &m_ppRowList[iRow + 1], sizeof(RL_Row *) * (m_iNumRows - iRow));