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 <[email protected]> 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 <[email protected]> Tested-by: Marco Cecchetti <[email protected]> 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); + } } } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
