diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-08-02 10:12:39 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-08-03 14:34:40 +0200 |
commit | c4bd30843034e2a1abe53686d19bdef27fdf3d75 (patch) | |
tree | 5d6d7b9d93b699be3b5bdf3cc48a7a0eff5a9c30 /sfx2 | |
parent | 4a69c103cd0a8f41c3c679bf9440c87974de933b (diff) |
sfx2: fix crash in SfxLokHelper::notifyOtherViews()
Crashreport signature:
program/libmergedlo.so
SfxLokHelper::notifyOtherViews(SfxViewShell const*, int, boost::property_tree::basic_ptree<std::string, std::string, std::less<std::string> > const&)
sfx2/source/view/lokhelper.cxx:518
program/libmergedlo.so
ImpEditView::ShowCursor(bool, bool)
editeng/source/editeng/impedit.cxx:1447
program/libsclo.so
ScViewData::SetEditEngine(ScSplitPos, ScEditEngineDefaulter*, vcl::Window*, short, int)
sc/source/ui/view/viewdata.cxx:1635
program/libsclo.so
ScTabView::UpdateEditView()
sc/source/ui/view/tabview3.cxx:2190
program/libsclo.so
ScTabView::extendTiledAreaIfNeeded()
sc/source/ui/view/tabview.cxx:3098
program/libmergedlo.so
doc_setClientVisibleArea
desktop/source/lib/init.cxx:6248
The current view should ideally never be nullptr, but if that's the
case, at least don't crash.
Change-Id: I521faa54373d2ce5ffb0983bac6caf0705767fdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155275
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit 3bf0f056eb7eba1f3569f95731e1014384fc53dd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155249
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 356925a6a341..d56862d26493 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -505,7 +505,7 @@ void SfxLokHelper::notifyOtherViews(const SfxViewShell* pThisView, int nType, const boost::property_tree::ptree& rTree) { assert(pThisView != nullptr && "pThisView must be valid"); - if (DisableCallbacks::disabled()) + if (!pThisView || DisableCallbacks::disabled()) return; // Cache the payload so we only have to generate it once, at most. |