summaryrefslogtreecommitdiff
path: root/sd/source/ui/app/sdmod.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/app/sdmod.cxx')
-rw-r--r--sd/source/ui/app/sdmod.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index f7e74a481740..957b1aa0475b 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -131,11 +131,6 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
SdModule::~SdModule()
{
- // Mark the module in the global AppData structure as deleted.
- SdModule** ppShellPointer = (SdModule**)GetAppData(SHL_DRAW);
- if (ppShellPointer != NULL)
- (*ppShellPointer) = NULL;
-
delete pSearchItem;
if( pNumberFormatter )
@@ -152,6 +147,13 @@ SdModule::~SdModule()
}
}
+ mpResourceContainer.reset();
+
+ // Mark the module in the global AppData structure as deleted.
+ SdModule** ppShellPointer = (SdModule**)GetAppData(SHL_DRAW);
+ if (ppShellPointer != NULL)
+ (*ppShellPointer) = NULL;
+
delete mpErrorHdl;
delete static_cast< VirtualDevice* >( mpVirtualRefDevice );
}