summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-01-16 15:54:06 +0000
committerNoel Power <noel.power@suse.com>2013-01-17 11:11:20 +0000
commit7273244d44e7ab1e64b57cd3de7f89e72cbd9507 (patch)
treefa4ba8b94620d55d3a2b533bcdbec6aebb663af5 /sd
parentb43bd72c7d81b58c5f58a5c29fab7982878b5f63 (diff)
Resolves: fdo#55974 segfault while closing an Impress file
regression since aa1927dc257b52edf96de220cc3797e02c83a0ae mpViewShell(pViewShell), +mpSlideSorterViewShell( ::boost::dynamic_pointer_cast< ::sd::slidesorter::SlideSorterViewShell >( pViewShell )), both are boost::shared_ptr potentially to the same thing then, given that we reset mpViewShell in ::disposing we presumably have to do the same thing to mpSlideSorterViewShell. add unset check on mpSlideSorterViewShell usages while I'm at it Change-Id: I35f51977c40f946a49789abd9405a4ef84aea0e8 (cherry picked from commit a0d852b2ade42289af1e9b066a48c97aedeff3b1) Reviewed-on: https://gerrit.libreoffice.org/1718 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/framework/factories/ViewShellWrapper.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index 2768e9974e49..bc50d9b8dc46 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -95,6 +95,7 @@ void SAL_CALL ViewShellWrapper::disposing (void)
xWindow->removeWindowListener(this);
}
+ mpSlideSorterViewShell.reset();
mpViewShell.reset();
}
@@ -145,6 +146,9 @@ sal_Bool SAL_CALL ViewShellWrapper::isAnchorOnly (void)
sal_Bool SAL_CALL ViewShellWrapper::select( const ::com::sun::star::uno::Any& aSelection ) throw(lang::IllegalArgumentException, uno::RuntimeException)
{
+ if (!mpSlideSorterViewShell)
+ return false;
+
bool bOk = true;
::sd::slidesorter::controller::SlideSorterController& rSlideSorterController
@@ -180,6 +184,9 @@ uno::Any SAL_CALL ViewShellWrapper::getSelection() throw(uno::RuntimeException)
{
Any aResult;
+ if (!mpSlideSorterViewShell)
+ return aResult;
+
slidesorter::model::PageEnumeration aSelectedPages (
slidesorter::model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mpSlideSorterViewShell->GetSlideSorter().GetModel()));