From b675a2eaf2434da54d14abebe464d1ab2af95abc Mon Sep 17 00:00:00 2001 From: ctrlaltca Date: Wed, 13 Mar 2024 10:04:31 +0100 Subject: [PATCH] Fix crash on undo; fix #2617 (#2618) --- src/kvirc/ui/KviInputEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kvirc/ui/KviInputEditor.cpp b/src/kvirc/ui/KviInputEditor.cpp index a73f2aaf6..e2fce24dc 100644 --- a/src/kvirc/ui/KviInputEditor.cpp +++ b/src/kvirc/ui/KviInputEditor.cpp @@ -2603,7 +2603,7 @@ void KviInputEditor::undo() if(m_UndoStack.empty()) return; // this should be ensured by isUndoAvailable() but well... - std::unique_ptr pCommand = std::move(m_RedoStack.back()); + std::unique_ptr pCommand = std::move(m_UndoStack.back()); m_UndoStack.pop_back(); Q_ASSERT(pCommand); // should be true: we delete the empty undo stack