diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-12-18 10:20:56 -0500 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2020-05-27 22:07:18 +0100 |
commit | c54b1995e983e000f6abc9152fb67e604ced8026 (patch) | |
tree | 552cc753cd0232b3dfeffceb0b43384f7c101d2a | |
parent | 5123f606f654be54a40785ca081eaadc5421d378 (diff) |
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@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 25d8db8598ac54fe3ef1d6f40076ff19db87cd2f)
Reviewed-on: https://gerrit.libreoffice.org/85686
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
-rw-r--r-- | vcl/source/window/floatwin.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 5bfea6bfac9f..81c0ddb3d32d 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -671,9 +671,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(); + } } } |