Kaydet (Commit) a0d852b2 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#55974 segfault while closing an Impress file

regression since aa1927dc

 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
üst 1ca295eb
...@@ -95,6 +95,7 @@ void SAL_CALL ViewShellWrapper::disposing (void) ...@@ -95,6 +95,7 @@ void SAL_CALL ViewShellWrapper::disposing (void)
xWindow->removeWindowListener(this); xWindow->removeWindowListener(this);
} }
mpSlideSorterViewShell.reset();
mpViewShell.reset(); mpViewShell.reset();
} }
...@@ -145,6 +146,9 @@ sal_Bool SAL_CALL ViewShellWrapper::isAnchorOnly (void) ...@@ -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) 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; bool bOk = true;
::sd::slidesorter::controller::SlideSorterController& rSlideSorterController ::sd::slidesorter::controller::SlideSorterController& rSlideSorterController
...@@ -180,6 +184,9 @@ uno::Any SAL_CALL ViewShellWrapper::getSelection() throw(uno::RuntimeException) ...@@ -180,6 +184,9 @@ uno::Any SAL_CALL ViewShellWrapper::getSelection() throw(uno::RuntimeException)
{ {
Any aResult; Any aResult;
if (!mpSlideSorterViewShell)
return aResult;
slidesorter::model::PageEnumeration aSelectedPages ( slidesorter::model::PageEnumeration aSelectedPages (
slidesorter::model::PageEnumerationProvider::CreateSelectedPagesEnumeration( slidesorter::model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mpSlideSorterViewShell->GetSlideSorter().GetModel())); mpSlideSorterViewShell->GetSlideSorter().GetModel()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment