From 1dc2221b2639820a3949f37721243a18cfb74dd1 Mon Sep 17 00:00:00 2001 From: Luke Symes Date: Sun, 26 Jun 2011 22:13:01 +1200 Subject: Fix ScrollToAbsPos to work when we have an empty list. --- svtools/source/contnr/svimpbox.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'svtools') diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index fd5a649d833c..e0e9efca6f59 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -1014,6 +1014,8 @@ void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, sal_Bool bMoveToTop ) void SvImpLBox::ScrollToAbsPos( long nPos ) { + if( pView->GetVisibleCount() == 0 ) + return; long nLastEntryPos = pView->GetAbsPos( pView->Last() ); if( nPos < 0 ) -- cgit