[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 18 18:55:29 UTC 2019


 vcl/source/window/floatwin.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 25d8db8598ac54fe3ef1d6f40076ff19db87cd2f
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Dec 18 10:20:56 2019 -0500
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Wed Dec 18 19:53:43 2019 +0100

    sfx2: tolerate missing LOKNotifier on FloatingWindow hide
    
    It seems the assumption is that if we get to hide state
    then we must have initialized properly and set a LOKNotifier.
    But this seems not to always hold, for whatever reason.
    
    Here we are more forgiving if we don't have LOKNotifier.
    
    Change-Id: Id21ec83489776f34228dd31f63e711b0dd77af55
    Reviewed-on: https://gerrit.libreoffice.org/85401
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 6c27982ae74f..0ef5125e92c7 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -666,9 +666,11 @@ void FloatingWindow::StateChanged( StateChangedType nType )
         }
         else if (!IsVisible() && nType == StateChangedType::Visible)
         {
-            assert(GetLOKNotifier());
-            GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "close");
-            ReleaseLOKNotifier();
+            if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+            {
+                pNotifier->notifyWindow(GetLOKWindowId(), "close");
+                ReleaseLOKNotifier();
+            }
         }
     }
 


More information about the Libreoffice-commits mailing list