[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - include/svx

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue May 5 18:07:37 UTC 2020


 include/svx/svdhdl.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ee74bd26ef3cd6522ed1687ee2ddc573fba36fff
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri May 1 16:12:24 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue May 5 20:07:02 2020 +0200

    tdf#130792 Draw crashes when trying to add a point in a multiline
    
    regression from
        commit b4fc996520b47a6212661a9de3a1c72ccfc379a4
        loplugin:useuniqueptr in SdrHdlList
    which changed SdrHdlList so that it crashes when passed a bad index.
    
    I can't seem to fix the calling code without creating other regressions,
    so just revert that part of the commit.
    
    The calling code is in SdrDragView::ImpBegInsObjPoint where it calls
    BegDragObj
    
    Change-Id: I494baa9a2e815fd7b9532840b65483ba2a70bd42
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93277
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 31a44b5d08a1419aa1693996376514db577a5e01)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93381
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index 2aaa3b7f7bc7..9df6d7692cdb 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -459,7 +459,7 @@ public:
     //          3.Level Position (x+y)
     void     Sort();
     size_t   GetHdlCount() const { return maList.size(); }
-    SdrHdl*  GetHdl(size_t nNum) const { return maList[nNum].get(); }
+    SdrHdl*  GetHdl(size_t nNum) const { return nNum < maList.size() ? maList[nNum].get() : nullptr; }
     size_t   GetHdlNum(const SdrHdl* pHdl) const;
     void     SetHdlSize(sal_uInt16 nSiz);
     sal_uInt16   GetHdlSize() const                        { return nHdlSize; }


More information about the Libreoffice-commits mailing list