aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ring.cpp')
-rw-r--r--src/ring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ring.cpp b/src/ring.cpp
index ac3a09d..702807d 100644
--- a/src/ring.cpp
+++ b/src/ring.cpp
@@ -252,8 +252,8 @@ Ring::close(void)
QRegisters::hook(QRegisters::HOOK_CLOSE);
close(buffer);
current = buffer->next() ? : buffer->prev();
- /* transfer responsibility to UndoToken object */
- undo.push(new UndoTokenEdit(this, buffer));
+ /* Transfer responsibility to UndoToken object. */
+ undo.push_own<UndoTokenEdit>(this, buffer);
if (current) {
current->edit();