sw/source/core/inc/rolbck.hxx | 2 ++ 1 file changed, 2 insertions(+) New commits: commit 7b689371cc344f14af783f87c7fe37f5350c10ab Author: Takeshi Abe <t...@fixedpoint.jp> Date: Sun Jul 15 03:02:13 2012 +0900
fdo#52013: Writer will crash when the undo-redoing if it contains dummy text this fixes a regression introduced at 9c0ca924446933431d736ee0dd37e6852b4947dc by making assure that destination history has enough capacity Change-Id: I3f608f7ab4a2617b695a5441d41553049cff333b diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx index a597b95..982d26e 100644 --- a/sw/source/core/inc/rolbck.hxx +++ b/sw/source/core/inc/rolbck.hxx @@ -399,6 +399,8 @@ public: { SwpHstry::iterator itSourceBegin = pIns->m_SwpHstry.begin() + nStart; SwpHstry::iterator itSourceEnd = pIns->m_SwpHstry.end(); + if (itSourceBegin == itSourceEnd) return; + m_SwpHstry.reserve(nPos + static_cast<size_t>(itSourceEnd - itSourceBegin)); std::copy( itSourceBegin, itSourceEnd, m_SwpHstry.begin() + nPos ); pIns->m_SwpHstry.erase( itSourceBegin, itSourceEnd ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits