summaryrefslogtreecommitdiff
path: root/svl/source
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source')
-rw-r--r--svl/source/items/IndexedStyleSheets.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/svl/source/items/IndexedStyleSheets.cxx b/svl/source/items/IndexedStyleSheets.cxx
index ca45b534ee92..087f8172f124 100644
--- a/svl/source/items/IndexedStyleSheets.cxx
+++ b/svl/source/items/IndexedStyleSheets.cxx
@@ -182,7 +182,9 @@ IndexedStyleSheets::HasStyleSheet(rtl::Reference< SfxStyleSheetBase > style) con
rtl::Reference< SfxStyleSheetBase >
IndexedStyleSheets::GetStyleSheetByPosition(unsigned pos)
{
- return mStyleSheets.at(pos);
+ if( pos < mStyleSheets.size() )
+ return mStyleSheets.at(pos);
+ return NULL;
}
void