Initialize wxGrid::m_batchCount before using it.
Adjust the initialization order in wxGrid::Init() to avoid using uninitialized variables. Closes #12226. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@64935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4630,6 +4630,7 @@ void wxGrid::Init()
|
||||
|
||||
m_currentCellCoords = wxGridNoCellCoords;
|
||||
|
||||
m_batchCount = 0; // used by ClearSelection() so init before calling it
|
||||
ClearSelection();
|
||||
|
||||
m_selectionBackground = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
|
||||
@@ -4638,7 +4639,6 @@ void wxGrid::Init()
|
||||
m_editable = true; // default for whole grid
|
||||
|
||||
m_inOnKeyDown = false;
|
||||
m_batchCount = 0;
|
||||
|
||||
m_extraWidth =
|
||||
m_extraHeight = 0;
|
||||
|
Reference in New Issue
Block a user