Skip to content

Commit

Permalink
Fix NullReferenceException spam when a vessel has no working connection
Browse files Browse the repository at this point in the history
  • Loading branch information
KSP-TaxiService committed Apr 24, 2017
1 parent f5306c8 commit c103f99
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/CommNetConstellation/CommNetLayer/CNCCommNetUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ private void updateView()
break;
}// end of switch

//check if nothing to draw
if (numLinks == 0)
{
if (this.line != null)
this.line.active = false;

this.points.Clear();
return;
}

//paint eligible connections
switch (CommNetUI.Mode)
{
Expand Down

0 comments on commit c103f99

Please sign in to comment.