]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for incorrect assert in GetVisibleLinesRange
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Jul 2001 12:47:38 +0000 (12:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Jul 2001 12:47:38 +0000 (12:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 8ccd9c7798e19cbf605977f0190b10e2c4fd42aa..8c9f8439092b0986a68f6ec6277e610126b5251b 100644 (file)
@@ -4049,7 +4049,8 @@ void wxListMainWindow::GetVisibleLinesRange(size_t *from, size_t *to)
         }
     }
 
-    wxASSERT_MSG( m_lineFrom <= m_lineTo && m_lineTo < GetItemCount(),
+    wxASSERT_MSG( IsEmpty() ||
+                  (m_lineFrom <= m_lineTo && m_lineTo < GetItemCount()),
                   _T("GetVisibleLinesRange() returns incorrect result") );
 
     if ( from )