From b4a0317604b94fb6af8fa319eb63c0aabb63d681 Mon Sep 17 00:00:00 2001 From: yusuf-gunaydin Date: Sat, 6 Aug 2016 15:30:58 +0300 Subject: [PATCH] Fixed crash when undo is called on a TextBox with no changes. --- src/Avalonia.Controls/Utils/UndoRedoHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/Utils/UndoRedoHelper.cs b/src/Avalonia.Controls/Utils/UndoRedoHelper.cs index 7b88ade0ea..404b1e65da 100644 --- a/src/Avalonia.Controls/Utils/UndoRedoHelper.cs +++ b/src/Avalonia.Controls/Utils/UndoRedoHelper.cs @@ -37,7 +37,7 @@ namespace Avalonia.Controls.Utils public void Undo() { - if (_currentNode != null) + if (_currentNode?.Previous != null) { _currentNode = _currentNode.Previous; }