summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/confuno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/unoobj/confuno.cxx')
-rw-r--r--sc/source/ui/unoobj/confuno.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index c7f19d4f4b93..728d17c5f8fd 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -191,11 +191,11 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
{
if (pPrinter->GetName() != sPrinterName)
{
- SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
+ VclPtrInstance<SfxPrinter> pNewPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
if (pNewPrinter->IsKnown())
pDocShell->SetPrinter( pNewPrinter, SfxPrinterChangeFlags::PRINTER );
else
- delete pNewPrinter;
+ pNewPrinter.disposeAndClear();
}
}
else