Merge pull request #721 from PepperDash/hotfix/plugin-loading

adds check for abstract class before attempting to create instance
This commit is contained in:
Andrew Welker
2021-06-16 15:17:32 -06:00
committed by GitHub

View File

@@ -375,7 +375,7 @@ namespace PepperDash.Essentials
{ {
try try
{ {
if (typeof (IPluginDeviceFactory).IsAssignableFrom(type)) if (typeof (IPluginDeviceFactory).IsAssignableFrom(type) && !type.IsAbstract)
{ {
var plugin = var plugin =
(IPluginDeviceFactory) Crestron.SimplSharp.Reflection.Activator.CreateInstance(type); (IPluginDeviceFactory) Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);