[Libreoffice-commits] core.git: sfx2/source

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 30 13:43:16 UTC 2020


 sfx2/source/view/lokhelper.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit dead5cae834e78cacee2275c2d1ca60dac51dd7c
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Jun 26 13:07:40 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Jun 30 15:42:32 2020 +0200

    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 at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97409
    Tested-by: Jenkins

diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index d8f36c28acc9..80d029f1d8ca 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -430,7 +430,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);
     }


More information about the Libreoffice-commits mailing list