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

New commits:
commit 72b2afe901b4d830f81152e8c1d1de54ed0fee17
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Feb 21 12:02:33 2022 +0000
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Wed Feb 23 13:07:43 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>
    (cherry picked from commit ec21d93f5b649353439d7498d9e0fb9136a5fb6b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130322
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

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