Browse Source

BUG: Prevent deleting not existing variables and therefore prevent crash. Fixes: Bug #750 - CCMake crashes when deleting all variables

Andy Cedilnik 21 years ago
parent
commit
0986b42761
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/CursesDialog/cmCursesMainForm.cxx

+ 1 - 1
Source/CursesDialog/cmCursesMainForm.cxx

@@ -1072,7 +1072,7 @@ void cmCursesMainForm::HandleInput()
           }
           }
         }
         }
       // delete cache entry
       // delete cache entry
-      else if ( key == 'd' )
+      else if ( key == 'd' && m_NumberOfVisibleEntries )
         {
         {
         m_OkToGenerate = false;
         m_OkToGenerate = false;
         FIELD* cur = current_field(m_Form);
         FIELD* cur = current_field(m_Form);