diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index 22e2a2ded..00eccbb75 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -31482,12 +31482,12 @@ namespace Nikse.SubtitleEdit.Forms return; } - string newText = p.Text.TrimEnd(); - string oldText = _listViewTextUndoLast.TrimEnd(); - if (oldText == null) + var newText = p.Text.TrimEnd(); + if (_listViewTextUndoLast == null) { return; } + var oldText = _listViewTextUndoLast.TrimEnd(); if (_listViewTextUndoLast != newText) {