Skip to content

Commit 7f210f6

Browse files
committed
2 parents 53e4b31 + 07c86a0 commit 7f210f6

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

ASCOM.Com/ASCOM.Com.DriverAccess/Telescope.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,17 @@ public ITrackingRates TrackingRates
10071007

10081008
foreach (var rate in (base.Device.TrackingRates))
10091009
{
1010-
rates.Add((DriveRate)rate);
1010+
try
1011+
{
1012+
if (rate != null && Enum.IsDefined(typeof(DriveRate), rate))
1013+
{
1014+
rates.Add((DriveRate)rate);
1015+
}
1016+
}
1017+
catch
1018+
{
1019+
1020+
}
10111021
}
10121022
return rates;
10131023
}

0 commit comments

Comments
 (0)