[Libreoffice-commits] core.git: include/svx svx/source

Takeshi Abe tabe at fixedpoint.jp
Fri Sep 8 11:27:50 UTC 2017


 include/svx/svddrag.hxx       |    1 +
 svx/source/svdraw/svddrag.cxx |    2 ++
 2 files changed, 3 insertions(+)

New commits:
commit ecc64b73cf554a772a3e2eb987b83b6e8245266f
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Fri Sep 8 18:28:29 2017 +0900

    svx: Make SdrDragStatUserData's dtor pure virtual
    
    to clarify that it is an abstract base class, and to avoid memleak
    when deleting derived instance as pUser in SdrDragStat::Clear().
    
    Change-Id: I39670841fda1ea3c45698585ce50aec944e0d4ab
    Reviewed-on: https://gerrit.libreoffice.org/42097
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svx/svddrag.hxx b/include/svx/svddrag.hxx
index 6764e71b0cf7..608d32bfdfbd 100644
--- a/include/svx/svddrag.hxx
+++ b/include/svx/svddrag.hxx
@@ -39,6 +39,7 @@ class SdrDragMethod;
 
 struct SVX_DLLPUBLIC SdrDragStatUserData
 {
+    virtual ~SdrDragStatUserData() = 0;
 };
 
 class SVX_DLLPUBLIC SdrDragStat {
diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx
index d527c9865d8e..f9d943f009c5 100644
--- a/svx/source/svdraw/svddrag.cxx
+++ b/svx/source/svdraw/svddrag.cxx
@@ -20,6 +20,8 @@
 #include <svx/svdview.hxx>
 #include <svx/svddrag.hxx>
 
+SdrDragStatUserData::~SdrDragStatUserData() = default;
+
 void SdrDragStat::Clear(bool bLeaveOne)
 {
     while (!aPnts.empty()) {


More information about the Libreoffice-commits mailing list