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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 2 11:13:41 UTC 2021


 svx/source/svdraw/svdmodel.cxx |    2 --
 1 file changed, 2 deletions(-)

New commits:
commit f421c3fa72d85f484f136264917e8d482339150e
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jun 2 11:44:02 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jun 2 13:12:59 2021 +0200

    this is not worth warning about
    
    calling code seems to think it's quite fine to do, and is
    happy with a nullptr return
    
    Change-Id: Ia003364ad91a56f2f80ada3076a69d79b30e9c35
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116573
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 14d2242cb1c5..e8044ec2fda2 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1809,13 +1809,11 @@ void SdrModel::WriteUserDataSequence(css::uno::Sequence < css::beans::PropertyVa
 
 const SdrPage* SdrModel::GetPage(sal_uInt16 nPgNum) const
 {
-    DBG_ASSERT(nPgNum < maPages.size(), "SdrModel::GetPage: Access out of range (!)");
     return nPgNum < maPages.size() ? maPages[nPgNum].get() : nullptr;
 }
 
 SdrPage* SdrModel::GetPage(sal_uInt16 nPgNum)
 {
-    DBG_ASSERT(nPgNum < maPages.size(), "SdrModel::GetPage: Access out of range (!)");
     return nPgNum < maPages.size() ? maPages[nPgNum].get() : nullptr;
 }
 


More information about the Libreoffice-commits mailing list