sd/source/core/stlpool.cxx | 2 ++ svl/source/items/IndexedStyleSheets.cxx | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-)
New commits: commit cb1384b324580f23f652a1d8b922e94a7a212f1e Author: Muthu Subramanian <sumu...@collabora.com> Date: Fri Apr 4 12:10:01 2014 +0530 cp#1000054: Avoid crashing. Change-Id: Iedafa35cfedce1d56468774fcb6bbfa8e42612df diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 8a7cc23..19f3031 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -655,6 +655,8 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily it != aSheetsWithFamily.end(); ++it ) { rtl::Reference< SfxStyleSheetBase > xSheet = GetStyleSheetByPositionInIndex( *it ); + if( !xSheet.is() ) + continue; rtl::OUString aName( xSheet->GetName() ); // now check whether we already have a sheet with the same name diff --git a/svl/source/items/IndexedStyleSheets.cxx b/svl/source/items/IndexedStyleSheets.cxx index ca45b53..087f817 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits