summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/tree/treedatamodel.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx
index 292d68555dcf..c8859a202880 100644
--- a/toolkit/source/controls/tree/treedatamodel.cxx
+++ b/toolkit/source/controls/tree/treedatamodel.cxx
@@ -447,6 +447,9 @@ void SAL_CALL MutableTreeNode::removeChildByIndex( sal_Int32 nChildIndex ) throw
xImpl = (*aIter);
maChildren.erase( aIter );
+ if( !xImpl.is() )
+ throw IndexOutOfBoundsException();
+
xImpl->setParent(0);
xImpl->mbIsInserted = false;