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

New commits:
commit ec21d93f5b649353439d7498d9e0fb9136a5fb6b
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:24 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/+/130255
    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 8a6cad12ecfc..1a0a93e5fc01 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1909,7 +1909,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