Prevent an out of range exception from being thrown. (was commonly being thrown when commit was used on the last row of the grid)

Originally committed to SVN as r2945.
This commit is contained in:
harukalover 2009-05-17 05:47:28 +00:00
parent a60d16913d
commit 5b9bd7ac6d
1 changed files with 1 additions and 0 deletions

View File

@ -224,6 +224,7 @@ void BaseGrid::ClearSelection() {
/////////////////////////
// Is cell in selection?
bool BaseGrid::IsInSelection(int row, int col) const {
if (row >= GetRows() || row < 0) return false;
(void) col;
try {
return selMap.at(row);