Skip to content

Commit

Permalink
Fix crash on undo; fix #2617 (#2618)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltca authored Mar 13, 2024
1 parent 5ddf504 commit b675a2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kvirc/ui/KviInputEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2603,7 +2603,7 @@ void KviInputEditor::undo()
if(m_UndoStack.empty())
return; // this should be ensured by isUndoAvailable() but well...

std::unique_ptr<EditCommand> pCommand = std::move(m_RedoStack.back());
std::unique_ptr<EditCommand> pCommand = std::move(m_UndoStack.back());
m_UndoStack.pop_back();

Q_ASSERT(pCommand); // should be true: we delete the empty undo stack
Expand Down

0 comments on commit b675a2e

Please sign in to comment.