From d8e6043602f594dd155c51ea4d9200a1a1396007 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. See #17537. (cherry picked from commit 5d671d81366fbe5843822edbde10fdbdd7bdd6de) --- 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 4255810678..ff21503984 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -4006,7 +4006,7 @@ bool wxDataViewMainWindow::TryAdvanceCurrentColumn(wxDataViewTreeNode *node, boo { if ( forward ) { - m_currentCol = GetOwner()->GetColumnAt(1); + m_currentCol = GetOwner()->GetColumnAt(0); m_currentColSetByKeyboard = true; RefreshRow(m_currentRow); return true;