From f74d0b57aaabeb1f446ff66fd3ee0c9212c30e66 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Fri, 20 Apr 2001 20:48:51 +0000 Subject: [PATCH] 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 --- src/generic/grid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ); } // -- 2.47.2