From 5d671d81366fbe5843822edbde10fdbdd7bdd6de Mon Sep 17 00:00:00 2001 From: Eric Raijmakers Date: Sat, 14 May 2016 15:53:28 +0200 Subject: [PATCH] Fix keyboard navigation crash in single column generic wxDataViewCtrl Selecting a leaf node in a wxDataViewCtrl and then pressing the right arrow key resulted in using an out-of-bounds index for accessing the columns list. Fix this by setting the current column to the first one, and not to the second one which might not exist. Closes #17537. --- src/generic/datavgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 95d235e91d..a18f8a5cd2 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -3959,7 +3959,7 @@ bool wxDataViewMainWindow::TryAdvanceCurrentColumn(wxDataViewTreeNode *node, wxK { if ( forward ) { - m_currentCol = GetOwner()->GetColumnAt(1); + m_currentCol = GetOwner()->GetColumnAt(0); m_currentColSetByKeyboard = true; RefreshRow(m_currentRow); return true;