summaryrefslogtreecommitdiff
path: root/eventattacher
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-08-11 00:46:42 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-08-16 21:22:40 -0400
commit85696df0b13e18f3782d196f50baa06bf099e0ef (patch)
tree4c569da9a905ee92beca6a8c5f21f757a8f9f04d /eventattacher
parent98dc4bb8a1d029ba8b01504b74ed5397e1e7164b (diff)
Fixed a crash due to invalid index for Sequence.
With this, 3.81 sec -> 1.2 sec.
Diffstat (limited to 'eventattacher')
-rw-r--r--eventattacher/source/eventattacher.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx
index 7deb8113224c..79879684fc56 100644
--- a/eventattacher/source/eventattacher.cxx
+++ b/eventattacher/source/eventattacher.cxx
@@ -743,6 +743,7 @@ Sequence< Reference<XEventListener> > EventAttacherImpl::attachListeners(
return Sequence< Reference<XEventListener> >();
Sequence< Reference<XEventListener> > aRet(nCount);
+ Reference<XEventListener>* pArray = aRet.getArray();
for (sal_Int32 i = 0; i < nCount; ++i)
{
@@ -846,7 +847,7 @@ Sequence< Reference<XEventListener> > EventAttacherImpl::attachListeners(
// Anything else is not supported
}
}
- aRet[nCount] = xRet;
+ pArray[i] = xRet;
}
return aRet;