]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 1192917 ] Grids with no row or col headers cause AV under wxGTK
authorJulian Smart <julian@anthemion.co.uk>
Sun, 22 May 2005 14:32:15 +0000 (14:32 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 22 May 2005 14:32:15 +0000 (14:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grid.cpp

index 66b281a0330c0a6c3f42a61a8600d7ba07a414b7..a658bb4db2b4235e393c5f3adca92aa947aa4b98 100644 (file)
@@ -7258,7 +7258,7 @@ void wxGrid::DrawRowLabels( wxDC& dc ,const wxArrayInt& rows)
 
 void wxGrid::DrawRowLabel( wxDC& dc, int row )
 {
-    if ( GetRowHeight(row) <= 0 )
+    if ( GetRowHeight(row) <= 0 || m_rowLabelWidth <= 0 )
         return;
 
     wxRect rect;
@@ -7320,7 +7320,7 @@ void wxGrid::DrawColLabels( wxDC& dc,const wxArrayInt& cols )
 
 void wxGrid::DrawColLabel( wxDC& dc, int col )
 {
-    if ( GetColWidth(col) <= 0 )
+    if ( GetColWidth(col) <= 0 || m_colLabelHeight <= 0 )
         return;
 
     int colLeft = GetColLeft(col);