Fixed bug where closing text editor would make it crash

This commit is contained in:
Lukasz Baldyga committed 2020-10-23 02:42:45 +01:00
1 parent 3521d42512
commit 69a6562482
1 file changed
+1 -1
@@ -47,7 +47,7 @@ namespace Advanced_Software_Engineering {
} }
private void Console_FormClosed(object sender, FormClosedEventArgs e) { private void Console_FormClosed(object sender, FormClosedEventArgs e) {
if (DisplayForm != null || !DisplayForm.IsDisposed) DisplayForm.ReleaseCommandLock(); if (DisplayForm != null && !DisplayForm.IsDisposed) DisplayForm.ReleaseCommandLock();
SettingsAndHelperFunctions.WindowClosed(); SettingsAndHelperFunctions.WindowClosed();
Dispose(); Dispose();
} }