mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
adds check for abstract class before attempting to create instance
This commit is contained in:
parent
98d3a4a2fa
commit
cc742f4291
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue