]> git.saurik.com Git - wxWidgets.git/commitdiff
Hopefully fixed bug #233492 (SelectAll crashed on empty grids).
authorStefan Neis <Stefan.Neis@t-online.de>
Fri, 20 Apr 2001 20:48:51 +0000 (20:48 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Fri, 20 Apr 2001 20:48:51 +0000 (20:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grid.cpp

index d653d727ee7c86f00e168c01a113ceaf55514f75..186c7ba70a0a7f421763ee6815a2e6a797c1ee8f 100644 (file)
@@ -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 );
 }
 
 //