Guard against observed exception
This commit is contained in:
parent
60ec4daaab
commit
27dd2ecedb
1 changed files with 10 additions and 3 deletions
|
|
@ -47,9 +47,16 @@ namespace MatterHackers.GCodeVisualizer
|
|||
|
||||
public ExtrusionColors(HashSet<float> speeds)
|
||||
{
|
||||
min = speeds.Min();
|
||||
max = speeds.Max();
|
||||
|
||||
if (speeds.Any())
|
||||
{
|
||||
min = speeds.Min();
|
||||
max = speeds.Max();
|
||||
}
|
||||
else
|
||||
{
|
||||
min = 0;
|
||||
max = 1;
|
||||
}
|
||||
range = max - min;
|
||||
delta = startColor - endColor;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue