sw/source/core/crsr/crsrsh.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 6e6cb89df3ee6b001b94a758920b679e5c4d53b8 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed Jul 14 16:30:49 2021 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Thu Jul 15 10:44:09 2021 +0200 sw lok: guard against half-constructed views in sendLOKCursorUpdates() Crashreport backtrace is: SwCursorShell::sendLOKCursorUpdates() sw/source/core/crsr/crsrsh.cxx:2044 SwCursorShell::UpdateCursor(unsigned short, bool) sw/source/core/crsr/crsrsh.cxx:2032 SwCursorShell::GotoFieldmark(sw::mark::IFieldmark const*) sw/source/core/crsr/crbm.cxx:315 SwWrtShell::GotoFieldmark(sw::mark::IFieldmark const*) sw/source/uibase/wrtsh/wrtsh3.cxx:93 (discriminator 4) SwWrtShell::SwWrtShell(SwDoc&, vcl::Window*, SwView&, SwViewOption const*) sw/source/uibase/wrtsh/wrtsh1.cxx:1709 SwView::SwView(SfxViewFrame*, SfxViewShell*) Change-Id: I26e0615747290c1e596db54cdbbc93b61b4067a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118938 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tor Lillqvist <t...@collabora.com> diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 7a3c3ec421b8..fd0e4aef29a8 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2035,7 +2035,8 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) void SwCursorShell::sendLOKCursorUpdates() { SwView* pView = static_cast<SwView*>(GetSfxViewShell()); - if (!pView) + // The view may not have a writer shell if the view's ctor did not finish yet. + if (!pView || !pView->GetWrtShellPtr()) return; SwWrtShell* pShell = &pView->GetWrtShell(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits