[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

Andre Fischer af at apache.org
Mon Jul 8 03:08:04 PDT 2013


 sw/source/core/docnode/nodes.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6bb49f538a9c7474effbff2ab1afdc57df4ab5f6
Author: Andre Fischer <af at apache.org>
Date:   Mon Jul 8 08:11:23 2013 +0000

    122682: Prevent crash when moving nodes.

diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index eddef2a..0ff1f8a 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -529,10 +529,10 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
     SwNodeIndex aNodeIndex (aRg.aEnd);
     while (aNodeIndex > aRg.aStart)
     {
-        SwNode* pNode = rNodes[aNodeIndex.GetIndex()];
-        if (pNode->GetNodeType() != ND_ENDNODE)
+        SwNode& rNode (aNodeIndex.GetNode());
+        if (rNode.GetNodeType() != ND_ENDNODE)
             break;
-        SwStartNode* pStartNode = pNode->pStartOfSection;
+        SwStartNode* pStartNode = rNode.pStartOfSection;
         if (pStartNode==NULL)
             break;
         if ( ! pStartNode->IsTableNode())


More information about the Libreoffice-commits mailing list