From: Stefan Neis Date: Fri, 20 Apr 2001 20:48:51 +0000 (+0000) Subject: Hopefully fixed bug #233492 (SelectAll crashed on empty grids). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f74d0b57aaabeb1f446ff66fd3ee0c9212c30e66 Hopefully fixed bug #233492 (SelectAll crashed on empty grids). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index d653d727ee..186c7ba70a 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -8345,7 +8345,8 @@ void wxGrid::SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, void wxGrid::SelectAll() { - m_selection->SelectBlock( 0, 0, m_numRows-1, m_numCols-1 ); + if ( m_numRows > 0 && m_numCols > 0 ) + m_selection->SelectBlock( 0, 0, m_numRows-1, m_numCols-1 ); } //