Catching stupid Crestron exception

This commit is contained in:
Chris Cameron
2018-02-16 13:36:22 -05:00
parent e308259a44
commit a710e4f052

View File

@@ -42,7 +42,15 @@ namespace ICD.Common.Utils.Extensions
if (extends == null)
throw new ArgumentNullException("extends");
return extends.GetCustomAttributes(typeof(T), inherits).Cast<T>();
try
{
return extends.GetCustomAttributes(typeof(T), inherits).Cast<T>();
}
// Crestron bug?
catch (ArgumentNullException)
{
return Enumerable.Empty<T>();
}
}
/// <summary>