X Tutup
Skip to content

Fix crash after calling EditorUndoRedoManager.clear_history() and then interacting with history dock entries#114439

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
Open-Industry-Project:fix-undo-redo-crash
Jan 1, 2026
Merged

Fix crash after calling EditorUndoRedoManager.clear_history() and then interacting with history dock entries#114439
akien-mga merged 1 commit intogodotengine:masterfrom
Open-Industry-Project:fix-undo-redo-crash

Conversation

@ryevdokimov
Copy link
Contributor

Fixes: #114429

This makes the clear_history() method actually perform the function per the documentation, although it originally tries to clear all history. I think the documented approach makes more sense though.

Clears the given undo history. You can clear history for a specific scene, global history, or for all scenes at once if id is INVALID_HISTORY.

Either way the undo/redo stack needs to be cleared to prevent the crash.

@ryevdokimov ryevdokimov requested a review from a team December 30, 2025 11:15
@KoBeWi
Copy link
Member

KoBeWi commented Dec 30, 2025

for all scenes at once if id is INVALID_HISTORY.

That's a mistake. It's supposed to clear every history (including global). You may leave out remote though.

@ryevdokimov ryevdokimov requested a review from a team as a code owner December 30, 2025 16:27
@KoBeWi KoBeWi added this to the 4.6 milestone Dec 30, 2025
@akien-mga akien-mga merged commit 2e72c10 into godotengine:master Jan 1, 2026
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@ryevdokimov ryevdokimov deleted the fix-undo-redo-crash branch January 1, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor crashes after clearing EditorUndoRedoManager history and interacting with History dock entries

3 participants

X Tutup