[Libreoffice-commits] .: svtools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 30 02:04:54 PDT 2012


 svtools/source/contnr/treelist.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit c38d460d8112079c83c6a5175bdc8cc019328c1c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 30 10:02:58 2012 +0100

    Reapply eda255b38d871bb7d20432e5730cc8c68b3e2942
    
    ... "SvTreeList: fix singular iterator compare assertions" after commits that
    broke it again.
    
    Change-Id: I527fe37e2a0a9f6fbba468261892379920f02c10

diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index e489c7c..895ef97 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1378,7 +1378,8 @@ SvTreeList::GetChildIterators(const SvTreeListEntry* pParent) const
 {
     typedef std::pair<SvTreeListEntries::const_iterator, SvTreeListEntries::const_iterator> IteratorPair;
 
-    IteratorPair aRet;
+    static const SvTreeListEntries dummy; // prevent singular iterator asserts
+    IteratorPair aRet(dummy.begin(), dummy.end());
 
     if (!pParent)
         pParent = pRootItem;
@@ -1398,7 +1399,8 @@ std::pair<SvTreeListEntries::iterator, SvTreeListEntries::iterator>
 {
     typedef std::pair<SvTreeListEntries::iterator, SvTreeListEntries::iterator> IteratorPair;
 
-    IteratorPair aRet;
+    static SvTreeListEntries dummy; // prevent singular iterator asserts
+    IteratorPair aRet(dummy.begin(), dummy.end());
 
     if (!pParent)
         pParent = pRootItem;


More information about the Libreoffice-commits mailing list