diff --git a/Advanced Software Engineering/Advanced Software Engineering/TextEditor.cs b/Advanced Software Engineering/Advanced Software Engineering/TextEditor.cs index 88b04a6..44969bc 100644 --- a/Advanced Software Engineering/Advanced Software Engineering/TextEditor.cs +++ b/Advanced Software Engineering/Advanced Software Engineering/TextEditor.cs @@ -47,7 +47,7 @@ namespace Advanced_Software_Engineering { } private void Console_FormClosed(object sender, FormClosedEventArgs e) { - if (DisplayForm != null || !DisplayForm.IsDisposed) DisplayForm.ReleaseCommandLock(); + if (DisplayForm != null && !DisplayForm.IsDisposed) DisplayForm.ReleaseCommandLock(); SettingsAndHelperFunctions.WindowClosed(); Dispose(); }