diff options
author | Tor Lillqvist <tml@collabora.com> | 2020-06-26 13:07:40 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2020-06-29 14:28:56 +0200 |
commit | db934da2f3d6b9ae3a1f62579a173098e3c15742 (patch) | |
tree | 3a45187ceb6f28cc3fb4231d1b47c5b78f66e841 /sfx2 | |
parent | a656916acd2feb2c4663e97c536d254c68d69eeb (diff) |
tdf#128502: Fix (haha) for a crash with multiple docs open in the iOS app
Just a band-aid to avoid a crash. The LibreOfficeKit-related code
would need a thorough re-factoring to properly be prepared for
multiple open documents.
Change-Id: I8c31e2badd747f3086526f89638fa495f4dcf295
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97205
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97403
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 1bdb9c9898ea..0b92060785bb 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -427,7 +427,10 @@ void SfxLokHelper::notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc SfxViewShell* pViewShell = SfxViewShell::GetFirst(); while (pViewShell) { - if (pViewShell->GetDocId() == pCurrentViewShell-> GetDocId()) + // FIXME: What if SfxViewShell::Current() returned null? + // Should we then do this for all views of all open documents + // or not? + if (pCurrentViewShell == nullptr || pViewShell->GetDocId() == pCurrentViewShell-> GetDocId()) SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pDoc, bInvalidateAll); pViewShell = SfxViewShell::GetNext(*pViewShell); } |