Fixed multiple windows after docking.
[VesselSimulator.git] / KerbalEngineer / Flight / DisplayStack.cs
blob:a/KerbalEngineer/Flight/DisplayStack.cs -> blob:b/KerbalEngineer/Flight/DisplayStack.cs
--- a/KerbalEngineer/Flight/DisplayStack.cs
+++ b/KerbalEngineer/Flight/DisplayStack.cs
@@ -61,7 +61,14 @@
         /// </summary>

         private void Awake()

         {

-            Instance = this;

+            if (Instance == null)

+            {

+                Instance = this;

+            }

+            else

+            {

+                Destroy(this);

+            }

         }

 

         /// <summary>