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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 22 12:14:20 UTC 2021


 svx/source/form/filtnav.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c5f0852832319e64a5b83177e23fc0922002dfab
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 22 10:04:47 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Mar 22 13:13:34 2021 +0100

    cid#1473956 bogus Dereference after null check
    
    Change-Id: I9138f4c6ad9d8d436ea119b3541cc2a267c727c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112867
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 98f829767261..1ed83512fadb 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1533,6 +1533,7 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool)
             {
                 OUString aErrorMsg;
                 OUString aText = "IS NULL";
+                assert(pFilterItem && "if item is null this menu entry was removed and unavailable");
                 m_pModel->ValidateText(pFilterItem, aText, aErrorMsg);
                 m_pModel->SetTextForItem(pFilterItem, aText);
             }
@@ -1541,6 +1542,7 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool)
                 OUString aErrorMsg;
                 OUString aText = "IS NOT NULL";
 
+                assert(pFilterItem && "if item is null this menu entry was removed and unavailable");
                 m_pModel->ValidateText(pFilterItem, aText, aErrorMsg);
                 m_pModel->SetTextForItem(pFilterItem, aText);
             }


More information about the Libreoffice-commits mailing list