From 429fbbd0a1191d7986e9a48c1364eee4483c648c Mon Sep 17 00:00:00 2001 From: RealMangoRage <64402114+RealMangorage@users.noreply.github.com> Date: Wed, 31 Jul 2024 22:40:24 -0700 Subject: [PATCH] Added more optimizations... --- src/main/java/org/mangorage/eventbus/EventBus.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/mangorage/eventbus/EventBus.java b/src/main/java/org/mangorage/eventbus/EventBus.java index 2ebdbba..c61d2cf 100644 --- a/src/main/java/org/mangorage/eventbus/EventBus.java +++ b/src/main/java/org/mangorage/eventbus/EventBus.java @@ -150,7 +150,7 @@ public void post(E event) { genericType = genericEvent.getGenericType(); ListenerList list = (ListenerList) getListenerList(event.getClass(), genericType); - list.post(event); + if (list != null) list.post(event); } /**