summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx2
-rw-r--r--sw/source/uibase/inc/SwSpellDialogChildWindow.hxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 95fe970a04f4..b9a5ea30a518 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -160,7 +160,7 @@ SwSpellDialogChildWindow::~SwSpellDialogChildWindow ()
SwWrtShell* pWrtShell = GetWrtShell_Impl();
if(!m_pSpellState->m_bInitialCall && pWrtShell)
pWrtShell->SpellEnd();
- delete m_pSpellState;
+ m_pSpellState.reset();
}
SfxChildWinInfo SwSpellDialogChildWindow::GetInfo() const
diff --git a/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx b/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
index a1006d8df80b..50f8fdfdeaf7 100644
--- a/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
@@ -29,7 +29,7 @@ class SwSpellDialogChildWindow
: public svx::SpellDialogChildWindow
{
bool m_bIsGrammarCheckingOn;
- SpellState* m_pSpellState;
+ std::unique_ptr<SpellState> m_pSpellState;
SwWrtShell* GetWrtShell_Impl();
bool MakeTextSelection_Impl(SwWrtShell& rSh, ShellMode eSelMode);