[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - sc/source

Marco Cecchetti marco.cecchetti at collabora.com
Thu Oct 20 13:44:04 UTC 2016


 sc/source/ui/docshell/docfunc.cxx |   11 ++++++++++-
 sc/source/ui/view/viewfun6.cxx    |    6 +++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 98c8d1beb5933c7c2f04f6a0ede0d10605262cf6
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date:   Thu Oct 20 15:28:59 2016 +0200

    Calc: fix seg fault due to commit 483a866b
    
    Change-Id: Ifd49fb3fce2b49a70db6be99e20590323e3dc518
    Reviewed-on: https://gerrit.libreoffice.org/30105
    Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
    Tested-by: Marco Cecchetti <mrcekets at gmail.com>

diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 5305b74..38790ab 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1226,7 +1226,16 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow )
     if (rDoc.IsStreamValid(rPos.Tab()))
         rDoc.SetStreamValid(rPos.Tab(), false);
 
-    rDocShell.GetViewData()->GetViewShell()->OnLOKNoteStateChanged(rPos);
+
+    ScViewData* pViewData = rDocShell.GetViewData();
+    if (pViewData)
+    {
+        ScTabViewShell* pViewShell = pViewData->GetViewShell();
+        if (pViewShell)
+        {
+            pViewShell->OnLOKNoteStateChanged(rPos);
+        }
+    }
     rDocShell.SetDocumentModified();
 
     return true;
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index d5513cf..20418ec 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -509,7 +509,11 @@ void ScViewFunc::EditNote()
             {
                 ScrollToObject( pCaption );         // make object fully visible
                 static_cast< FuText* >( pPoor )->SetInEditMode( pCaption );
-                GetViewData().GetViewShell()->OnLOKNoteStateChanged(aPos);
+                ScTabViewShell* pViewShell = GetViewData().GetViewShell();
+                if (pViewShell)
+                {
+                    pViewShell->OnLOKNoteStateChanged(aPos);
+                }
             }
         }
     }


More information about the Libreoffice-commits mailing list