diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-10-30 17:24:59 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-10-30 17:25:49 +0100 |
commit | b72fca4ec4ad00786192bad68eba245cdeb6a692 (patch) | |
tree | 30cab5964d16d2bed485a9f8f20797ee4468ed96 /svtools/source/contnr | |
parent | 37cc83e594fa8ca131fc5fb98506287b7daedffd (diff) |
SvTreeList::GetEntry: detect an out-of-bound and return NULL in that case
That's how this worked prior to stlification.
Change-Id: I4b1a9735c92efc181a2d1f47cafb04d2855fdfe2
Diffstat (limited to 'svtools/source/contnr')
-rw-r--r-- | svtools/source/contnr/treelist.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 895ef9715903..1716e27021c0 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -1862,7 +1862,7 @@ SvTreeListEntry* SvTreeList::GetEntry( SvTreeListEntry* pParent, sal_uLong nPos SvTreeListEntry* SvTreeList::GetEntry( sal_uLong nRootPos ) const { SvTreeListEntry* pRet = 0; - if ( nEntryCount ) + if ( nEntryCount && nRootPos < pRootItem->maChildren.size()) pRet = &pRootItem->maChildren[nRootPos]; return pRet; } |