Skip to content

Commit

Permalink
Merge pull request #22 from ncguilbeault/main
Browse files Browse the repository at this point in the history
Check if GraphPane is null before attempting to modify CurveList
  • Loading branch information
glopesdev authored Apr 19, 2024
2 parents 11b4197 + 6f5a689 commit f656bbe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Bonsai.Gui.ZedGraph/BoundedGraphPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public int Capacity

protected override void OnInvalidated(InvalidateEventArgs e)
{
if (GraphPane is null)
{
return;
}
double? maxValue = null;
var curveList = GraphPane.CurveList;
for (int i = 0; i < curveList.Count; i++)
Expand Down

0 comments on commit f656bbe

Please sign in to comment.