summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-01-14 13:25:12 +0100
committerLuboš Luňák <l.lunak@suse.cz>2011-01-14 13:25:53 +0100
commit3170da9784c874a724c18cbb8215e6cbcd73365b (patch)
treecba1461a8b35e0d27374a82c01ba7dcd33be92b9 /sfx2
parent0459ed5d6025693e75397a86c41877739c7cedfb (diff)
fix out_of_range abort introduced in 7bc30e29
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index a0e52635e1db..6621092fb5e8 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1252,8 +1252,8 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
const SfxStyleFamily eFam = pItem->GetFamily();
- SfxFilterTupel *pT = pItem->GetFilterList().at(nActFilter);
- USHORT nFilter = pT ? pItem->GetFilterList().at(nActFilter)->nFlags : 0;
+ SfxFilterTupel *pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList().at(nActFilter) : NULL );
+ USHORT nFilter = pT ? pT->nFlags : 0;
if(!nFilter) // automatisch
nFilter = nAppFilter;