[Libreoffice-commits] core.git: 2 commits - sd/source sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Nov 2 17:13:38 UTC 2019


 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |    2 +-
 sw/source/uibase/shells/textsh1.cxx                    |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c43bcb42dcd9b76a203778ea825770a4b289a0f4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Nov 2 15:07:11 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Nov 2 18:11:46 2019 +0100

    cid#1455210 Dereference before null check
    
    Change-Id: Iadf78e41afabc8e3468e23bd5b249e47c019c843
    Reviewed-on: https://gerrit.libreoffice.org/81936
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index ba1152da21b6..43db80c7ec45 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -886,7 +886,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
     OUString aTitle;
     if( rRequest.GetSlot() == SID_RENAME_MASTER_PAGE )
         aTitle = SdResId( STR_TITLE_RENAMEMASTER );
-    else if (pDrView && pDrView->GetDoc().GetDocumentType() == DocumentType::Draw)
+    else if (pDrView->GetDoc().GetDocumentType() == DocumentType::Draw)
         aTitle = SdResId( STR_TITLE_RENAMEPAGE );
     else
         aTitle = SdResId( STR_TITLE_RENAMESLIDE );
commit 5876ae7e4b6ea8023cfa165998f4306cfe63b70b
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Nov 2 15:12:39 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Nov 2 18:11:32 2019 +0100

    cid#1455211 Dereference after null check
    
    Change-Id: I73ce64812d4ff88f7b1d0e122c208d64f04b893d
    Reviewed-on: https://gerrit.libreoffice.org/81937
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 0788f49e52a3..cf45dc26e513 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1184,7 +1184,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
                 aSet = static_cast<const SvxColorItem*>(pItem)->GetValue();
                 bHasItem = true;
             }
-            else if(SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
+            else if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
             {
                 sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
                 aSet = Color(sColor.toInt32(16));
@@ -1216,7 +1216,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
             OUString sColor;
             const SfxPoolItem* pColorStringItem = nullptr;
 
-            if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
+            if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
             {
                 sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
                 if (sColor == "transparent")


More information about the Libreoffice-commits mailing list