[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sd/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed May 5 11:22:07 UTC 2021


 sd/source/ui/annotations/annotationmanager.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 47310391ec9db819f4a7cea8183fa12f563b2033
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue May 4 21:04:40 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed May 5 13:21:32 2021 +0200

    rhbz#1956977 crash on switch from active comment to slide sorter
    
    Change-Id: I2b5a5cb8b0631971b775a70d96f2cbf0c118c090
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115076
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
    Tested-by: Jenkins

diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 155862469313..898eb201d78e 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -947,10 +947,13 @@ IMPL_LINK_NOARG(AnnotationManagerImpl, UpdateTagsHdl, void*, void)
 
 void AnnotationManagerImpl::CreateTags()
 {
-
     if( !(mxCurrentPage.is() && mpDoc) )
         return;
 
+    auto xViewShell = mrBase.GetMainViewShell();
+    if (!xViewShell)
+        return;
+
     try
     {
         int nIndex = 1;
@@ -963,7 +966,7 @@ void AnnotationManagerImpl::CreateTags()
         {
             Reference< XAnnotation > xAnnotation( xEnum->nextElement() );
             Color aColor( GetColorLight( mpDoc->GetAnnotationAuthorIndex( xAnnotation->getAuthor() ) ) );
-            rtl::Reference< AnnotationTag > xTag( new AnnotationTag( *this, *mrBase.GetMainViewShell()->GetView(), xAnnotation, aColor, nIndex++, maFont ) );
+            rtl::Reference< AnnotationTag > xTag( new AnnotationTag( *this, *xViewShell->GetView(), xAnnotation, aColor, nIndex++, maFont ) );
             maTagVector.push_back(xTag);
 
             if( xAnnotation == mxSelectedAnnotation )


More information about the Libreoffice-commits mailing list