diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-16 15:54:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-16 15:57:07 +0000 |
commit | a0d852b2ade42289af1e9b066a48c97aedeff3b1 (patch) | |
tree | cad3dd3d171875aba1d0e6b02eb951dc988264cb /sd | |
parent | 1ca295eb999fa08fbf0d211f1a464544532a253d (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
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/framework/factories/ViewShellWrapper.cxx | 7 |
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())); |