Moved ActiveVessel check from UpdateModules to FixedUpdate
Moved ActiveVessel check from UpdateModules to FixedUpdate

--- a/Documents/CHANGES.txt
+++ b/Documents/CHANGES.txt
@@ -1,10 +1,13 @@
-1.1.0.2
+1.1.0.2, 2016-04-19, KSP Build #1230
     Added: Altitude (terrain) readout now shows the altitude above underwater terrain when splashed down.
     Added: Usage of the stock IPartMassModifier for handling the modifying of part module staged mass.
+    Added: Support for thrustTranformMultipliers
     Changed: Fairing specific mass adjustments now make use of the generic staged mass modifier implementation.
     Changed: App launcher button handling works with KSP build 1205 changes.
+    Changed: Impact lat/long readouts to use DMS form.
     Fixed: Log spam and physics issue caused when using the EngineerChip part due to a convex mesh collider (now uses a box collider).
     Fixed: Issues with the disabling/enabling of the toolbar app launcher button in flight when in career mode.
+    Fixed: Bug with impact calculations.
 
 1.1.0.1, 2016-04-01, KSP Build #1179
     Fixed: Heat shields acting as staged decouplers when not set to be staged.

--- a/KerbalEngineer/Flight/FlightAppLauncher.cs
+++ b/KerbalEngineer/Flight/FlightAppLauncher.cs
@@ -179,6 +179,9 @@
 
         protected virtual void Update()
         {
+            if (Button == null)
+                return;
+
             if (FlightEngineerCore.IsDisplayable && Button.IsEnabled == false)
             {
                 Enable();

--- a/KerbalEngineer/Flight/FlightEngineerCore.cs
+++ b/KerbalEngineer/Flight/FlightEngineerCore.cs
@@ -290,6 +290,9 @@
         /// </summary>
         private void FixedUpdate()
         {
+            if (FlightGlobals.ActiveVessel == null)
+                return;
+
             try
             {
                 SectionLibrary.FixedUpdate();
@@ -351,6 +354,9 @@
         /// </summary>
         private void Update()
         {
+            if (FlightGlobals.ActiveVessel == null)
+                return;
+
             try
             {
                 SectionLibrary.Update();

--- a/KerbalEngineer/VesselSimulator/AttachNodeSim.cs
+++ b/KerbalEngineer/VesselSimulator/AttachNodeSim.cs
@@ -51,7 +51,10 @@
             return nodeSim;
         }
 
-        static private void Reset(AttachNodeSim attachNodeSim) { }
+        static private void Reset(AttachNodeSim attachNodeSim)
+        {
+            attachNodeSim.attachedPartSim = null;
+        }
 
 
         public void Release()

--- a/KerbalEngineer/VesselSimulator/EngineSim.cs
+++ b/KerbalEngineer/VesselSimulator/EngineSim.cs
@@ -54,6 +54,7 @@
         {
             engineSim.resourceConsumptions.Reset();
             engineSim.resourceFlowModes.Reset();
+            engineSim.partSim = null;
             engineSim.actualThrust = 0;
             engineSim.isActive = false;
             engineSim.isp = 0;

--- a/KerbalEngineer/VesselSimulator/PartSim.cs
+++ b/KerbalEngineer/VesselSimulator/PartSim.cs
@@ -86,9 +86,11 @@
             }
             partSim.attachNodes.Clear();
             partSim.fuelTargets.Clear();
+            partSim.surfaceMountFuelTargets.Clear();
             partSim.resourceDrains.Reset();
             partSim.resourceFlowStates.Reset();
             partSim.resources.Reset();
+            partSim.parent = null;
             partSim.baseCost = 0d;
             partSim.baseMass = 0d;
             partSim.baseMassForCoM = 0d;
@@ -626,6 +628,17 @@
                     this.fuelTargets[i] = null;
                 }
             }
+
+            // Loop through the surface attached fuel targets (surface attached parts for new flow modes)
+            for (int i = 0; i < this.surfaceMountFuelTargets.Count; i++)
+            {
+                PartSim fuelTargetSim = this.surfaceMountFuelTargets[i];
+                // If the part is in the set then "remove" it by clearing the PartSim reference
+                if (fuelTargetSim != null && partSims.Contains(fuelTargetSim))
+                {
+                    this.surfaceMountFuelTargets[i] = null;
+                }
+            }
         }
 
         public void SetupAttachNodes(Dictionary<Part, PartSim> partSimLookup, LogMsg log)