Always initialize wxGridCellBoolEditor::m_value
Do it even when the cell value is not one of the recognized boolean representations, as we later use m_value as an index into a 2 element array and leaving it uninitialized could result in an out of bound access, so make sure this doesn't happen.
This commit is contained in:
parent
251584b73b
commit
f845a8dc71
@ -1430,6 +1430,9 @@ void wxGridCellBoolEditor::SetValueFromGrid(int row, int col, wxGrid* grid)
|
||||
// this risks to be very surprising for the user code, let them
|
||||
// know about it
|
||||
wxFAIL_MSG( wxT("invalid value for a cell with bool editor!") );
|
||||
|
||||
// Still need to initialize it to something.
|
||||
m_value = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user