summaryrefslogtreecommitdiffstats
path: root/sd/inc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-01-13 00:16:02 +0100
committerMichael Stahl <mstahl@redhat.com>2017-01-13 00:27:15 +0100
commit983ac87793a891855c7d25c42fe795908543716c (patch)
tree8d815f2710d8c9868d73117540e7f44b72799a8e /sd/inc
parentDrop unused struct members (diff)
downloadcore-983ac87793a891855c7d25c42fe795908543716c.tar.gz
core-983ac87793a891855c7d25c42fe795908543716c.zip
tdf#105188 sd: fix shutdown crash after accessing master pages
The problem here is that the destructor of SdModule does a lot of things, including destroying an SdXImpressDocument that is referenced from some SdGlobalResourceContainer. This calls SD_MOD() to get the SdModule to get some resource, but at that point SfxApplication::GetModule() returns null, because the sequence was changed from first deleting the SfxModules, then clearing the pointer in ~SfxModule to null, to unique_ptr::reset(), which, at least in libstdc++, is implemented via std::swap, so it clears the pointer before deleting the SfxModule. It appears rather brittle to rely on such a subtle detail, so refactor things so that SdGlobalResourceContainer is no longer owned by SdModule but has its own pet XTerminationListener, which means it will be destroyed earlier, while the SdModule is still fully alive. (regression from f7b1cd66167050afecf487e3d89ea12de74200b5) Change-Id: I7f03f3adf431be8728ef3d65a078b536cb96f959
Diffstat (limited to 'sd/inc')
-rw-r--r--sd/inc/sdmod.hxx5
1 files changed, 0 insertions, 5 deletions
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 6a8f7351010c..c96a1b1749c9 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -47,7 +47,6 @@ namespace svtools { class ColorConfig; }
namespace sd {
class DrawDocShell;
-class SdGlobalResourceContainer;
}
namespace com { namespace sun { namespace star { namespace frame {
@@ -156,10 +155,6 @@ private:
static SfxFrame* CreateEmptyDocument( const css::uno::Reference< css::frame::XFrame >& i_rFrame );
static SfxFrame* CreateFromTemplate( const OUString& rTemplatePath, const css::uno::Reference< css::frame::XFrame >& i_rFrame );
- /** The resource container controls the lifetime of some singletons.
- */
- ::std::unique_ptr< ::sd::SdGlobalResourceContainer> mpResourceContainer;
-
bool mbEventListenerAdded;
/** Take an outline from a text document and create a new impress