diff options
Diffstat (limited to 'basctl/source/basicide/basdoc.cxx')
-rw-r--r-- | basctl/source/basicide/basdoc.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx index 7f0388960c11..93302febee1d 100644 --- a/basctl/source/basicide/basdoc.cxx +++ b/basctl/source/basicide/basdoc.cxx @@ -51,7 +51,9 @@ DocShell::DocShell() } DocShell::~DocShell() -{ } +{ + pPrinter.disposeAndClear(); +} SfxPrinter* DocShell::GetPrinter( bool bCreate ) { @@ -66,7 +68,10 @@ SfxPrinter* DocShell::GetPrinter( bool bCreate ) void DocShell::SetPrinter( SfxPrinter* pPr ) { if (pPr != pPrinter.get()) + { + pPrinter.disposeAndClear(); pPrinter.reset(pPr); + } } void DocShell::FillClass( SvGlobalName*, SotClipboardFormatId*, OUString*, OUString*, OUString*, sal_Int32, bool bTemplate) const |