Tools: Wrapped a findWorldCoM call in a try block to see about troubleshooting a Horrible Problem from what I'm guessing is something entirely unrelated.
[VOID.git] / Tools.cs
blob:a/Tools.cs -> blob:b/Tools.cs
--- a/Tools.cs
+++ b/Tools.cs
@@ -209,7 +209,17 @@
 		//From http://svn.mumech.com/KSP/trunk/MuMechLib/VOID.vesselState.cs
 		public static double MuMech_get_heading(Vessel vessel)
 		{
-			Vector3d CoM = vessel.findWorldCenterOfMass();
+			Vector3d CoM;
+
+			try
+			{
+				CoM = vessel.findWorldCenterOfMass();
+			}
+			catch
+			{
+				return double.NaN;
+			}
+
 			Vector3d up = (CoM - vessel.mainBody.position).normalized;
 			Vector3d north = Vector3d.Exclude(
 				                 up,