Skip to content

Commit cd4d739

Browse files
authored
Update FlareDraw.cs
1 parent 6a199b9 commit cd4d739

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source-Code/FlareDraw.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ private void GenerateBodyFlares()
282282
double largestSMA = 0.0;
283283
foreach (CelestialBody body in FlightGlobals.Bodies)
284284
{
285-
if (body != FlightGlobals.Bodies[0])
285+
if (body != FlightGlobals.Bodies[0] && body?.MapObject != null)
286286
{
287287
largestSMA = Math.Max(largestSMA, body.orbit.semiMajorAxis);
288288

0 commit comments

Comments
 (0)