ensure there is a current cell before using it to try and get width/height
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9615,7 +9615,7 @@ void wxGrid::SetCellHighlightPenWidth(int width)
|
|||||||
// make any visible change if the the thickness is getting smaller.
|
// make any visible change if the the thickness is getting smaller.
|
||||||
int row = m_currentCellCoords.GetRow();
|
int row = m_currentCellCoords.GetRow();
|
||||||
int col = m_currentCellCoords.GetCol();
|
int col = m_currentCellCoords.GetCol();
|
||||||
if ( GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 )
|
if ( row == -1 || col == -1 || GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxRect rect = CellToRect(row, col);
|
wxRect rect = CellToRect(row, col);
|
||||||
|
Reference in New Issue
Block a user