diff options
author | Muthu Subramanian <sumuthu@collabora.com> | 2014-04-04 12:10:01 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@collabora.com> | 2014-04-04 12:10:01 +0530 |
commit | cb1384b324580f23f652a1d8b922e94a7a212f1e (patch) | |
tree | e2e88f46824adda36913d8cb2c86769b0164965a /svl | |
parent | 240b8c63ff67510a0694cee9ebec310157e24307 (diff) |
cp#1000054: Avoid crashing.
Change-Id: Iedafa35cfedce1d56468774fcb6bbfa8e42612df
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/IndexedStyleSheets.cxx | 4 |
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 |