sfx2/source/control/templatelocalview.cxx |    2 --
 1 file changed, 2 deletions(-)

New commits:
commit 05a338159761e012c2c8779f8927b0d709b4416f
Author: Julien Nabet <serval2...@yahoo.fr>
Date:   Thu Aug 10 21:06:43 2017 +0200

    tdf#111567: fix memleak in TemplateLocalView::insertItems
    
    Clearing mItemList at the begin of insertItems is a bad idea
    because it prevents ImplDeleteItems (called by updateItems,
    itself called at the end of insertItems) from clearing
    correctly mItemList
    See comments from bugtracker for more info
    
    (Thank you Alex for the precious info attached with memleak reports! :-))
    
    Change-Id: I04976dbb065d1369562649fc97c33f7fd599b107
    Reviewed-on: https://gerrit.libreoffice.org/40995
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    Tested-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/sfx2/source/control/templatelocalview.cxx 
b/sfx2/source/control/templatelocalview.cxx
index 81a6ef3bbe75..808e0b1a9a75 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -772,8 +772,6 @@ bool TemplateLocalView::renameItem(ThumbnailViewItem* 
pItem, const OUString& sNe
 
 void TemplateLocalView::insertItems(const std::vector<TemplateItemProperties> 
&rTemplates, bool isRegionSelected, bool bShowCategoryInTooltip)
 {
-    mItemList.clear();
-
     std::vector<ThumbnailViewItem*> aItems(rTemplates.size());
     for (size_t i = 0, n = rTemplates.size(); i < n; ++i )
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to