-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Labels
Good First IssueThis issue has limited complexity and may be a good start for new contributorsThis issue has limited complexity and may be a good start for new contributorsHelp WantedScott won't do this soon, but PRs from the community are welcome!Scott won't do this soon, but PRs from the community are welcome!⚠️ HIGH PRIORITY
Description
Issue:
I accidentally set text to null, got a crash due to exception.
Other places in Label do checks for NullOrEmpty, but it is missing here in Render, causing a null ref exception on Text.Contains
System.NullReferenceException: Object reference not set to an instance of an object.
at ScottPlot.Label.DrawText(SKCanvas canvas, MeasuredText measured, SKPaint paint, PixelRect textRect, Boolean bottom)
at ScottPlot.Label.Render(SKCanvas canvas, Pixel px, SKPaint paint, Boolean bottom)
ScottPlot Version: (What NuGet package are you using?)
5.0.34
Code Sample:
formsPlot1.Plot.Add.Text(null, 0, 0);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Good First IssueThis issue has limited complexity and may be a good start for new contributorsThis issue has limited complexity and may be a good start for new contributorsHelp WantedScott won't do this soon, but PRs from the community are welcome!Scott won't do this soon, but PRs from the community are welcome!⚠️ HIGH PRIORITY