diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-05-03 22:56:20 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-05-03 22:58:51 +0200 |
commit | a416d8be70f5044143f7de8a1b0cd9d3580ff798 (patch) | |
tree | 647e9874b0ed7ed1439c293f3746ddec8bc1b733 /editeng | |
parent | 72097be9ca128083ed5b1cf5a5166ea7419891c5 (diff) |
editeng: add pUndoManager assert in ImpEditEngine::~ImpEditEngine()
This too can be an application UndoManager loaned only temporarily
from getSdrUndoManagerForEnhancedTextEdit() and
SdrObjEditView::SdrBeginTextEdit() - it must be reset again via
SdrEndTextEdit().
Change-Id: I1f9d64d7af47ddc53d183bde6a6244ba5c261b0c
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 6a2a6f950bb6..df975e1eb882 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -193,6 +193,10 @@ ImpEditEngine::~ImpEditEngine() Dispose(); delete pEmptyItemSet; + // it's only legal to delete the pUndoManager if it was created by + // ImpEditEngine; if it was set by SetUndoManager() it must be cleared + // before destroying the ImpEditEngine! + assert(!pUndoManager || typeid(*pUndoManager) == typeid(EditUndoManager)); delete pUndoManager; delete pTextRanger; delete mpIMEInfos; |