sw/source/core/access/accframebase.cxx | 4 ++-- vcl/unx/gtk3/gtkinst.cxx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit 996ded6b42c924124f279a20a10a67754df80a8a Author: Caolán McNamara <[email protected]> AuthorDate: Tue Aug 16 12:36:47 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Aug 17 09:53:31 2022 +0200 cid#1509302 Dereference after null check Change-Id: I5dc783bd2651413140206ed42a174009cd3a0c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138395 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx index 1a5a8adde5a1..e0821f3ded24 100644 --- a/sw/source/core/access/accframebase.cxx +++ b/sw/source/core/access/accframebase.cxx @@ -124,8 +124,8 @@ SwAccessibleFrameBase::SwAccessibleFrameBase( m_bIsSelected( false ) { const SwFrameFormat* pFrameFormat = pFlyFrame->GetFormat(); - if(pFrameFormat) - StartListening(const_cast<SwFrameFormat*>(pFrameFormat)->GetNotifier()); + + StartListening(const_cast<SwFrameFormat*>(pFrameFormat)->GetNotifier()); SetName( pFrameFormat->GetName() ); commit 8575177e240f85850a3b9d27d41a61b3c5445fc7 Author: Caolán McNamara <[email protected]> AuthorDate: Tue Aug 16 12:32:39 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Aug 17 09:53:19 2022 +0200 cid#1509184 silence Out-of-bounds access Change-Id: Ie84f4e7288cfd6b7232352988bb2718f274d7eb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138394 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 74df879c85e1..1eb056936a41 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -8761,6 +8761,7 @@ private: { disable_notify_events(); int nPageNumber = get_page_number(pNotebook, ident); + assert(nPageNumber != -1 && "asked to remove page that doesn't exist"); gtk_notebook_remove_page(pNotebook, nPageNumber); enable_notify_events(); return nPageNumber;
