]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix crash in wxDataViewCtrl::UpdateColWidths().
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 5 Sep 2011 15:40:56 +0000 (15:40 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 5 Sep 2011 15:40:56 +0000 (15:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datavgen.cpp

index b7bcd11253211cf5294c2078ea9987d73e24d0de..6f44e1d13ed094efa24154dec34da6d877007bdb 100644 (file)
@@ -4381,12 +4381,11 @@ void wxDataViewCtrl::UpdateColWidths()
     if ( !m_headerArea )
         return;
 
-    for ( wxVector<int>::const_iterator i = m_colsBestWidths.begin();
-          i != m_colsBestWidths.end();
-          ++i )
+    const unsigned len = m_colsBestWidths.size();
+    for ( unsigned i = 0; i < len; i++ )
     {
-        if ( m_colsBestWidths[*i] == 0 )
-            m_headerArea->UpdateColumn(*i);
+        if ( m_colsBestWidths[i] == 0 )
+            m_headerArea->UpdateColumn(i);
     }
 }