From a0a962003bdc9abb333c108f65ddb309327b24e8 Mon Sep 17 00:00:00 2001 From: Christof Wollenhaupt Date: Thu, 5 Jan 2023 13:28:03 +0100 Subject: [PATCH] Bug fix: Not passing _VFP fails tests due to null reference. --- DotnetBridge/Utilities/EventSubscriber.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DotnetBridge/Utilities/EventSubscriber.cs b/DotnetBridge/Utilities/EventSubscriber.cs index e42e392..2e134c1 100644 --- a/DotnetBridge/Utilities/EventSubscriber.cs +++ b/DotnetBridge/Utilities/EventSubscriber.cs @@ -30,7 +30,7 @@ public EventSubscriber(object source, String prefix = "", dynamic vfp = null) foreach (var ev in source.GetType().GetEvents()) { // handler is a PRIVATE variable defined in EventSubscription.Setup(). - Boolean hasMethod = vfp?.Eval($"PEMSTATUS(m.handler, '{prefix}{ev.Name}', 5)"); + Boolean hasMethod = vfp?.Eval($"PEMSTATUS(m.handler, '{prefix}{ev.Name}', 5)") ?? true; if (!hasMethod) continue;