sw/source/core/layout/fly.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit af4b2f6dce49ac6dd564dc5e59894dd6716f9c46
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Feb 21 12:02:33 2022 +0000
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue Feb 22 13:09:33 2022 +0100

    cid#1500612 Dereference after null check
    
    otherwise this doesn't make sense
    
    Change-Id: I321a86cf8f9f05639b686a4c15b2e8fca2e10955
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130256
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 7c512b991699..a105882e800d 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1910,7 +1910,7 @@ void SwFlyFrame::ActiveUnfloatButton(SwWrtShell* pWrtSh)
     SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
     SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager();
     SwFrameControlPtr pControl = 
rMngr.GetControl(FrameControlType::FloatingTable, this);
-    if (pControl || pControl->GetWindow())
+    if (pControl && pControl->GetWindow())
     {
         pControl->GetWindow()->MouseButtonDown(MouseEvent());
     }

Reply via email to