add null handling to event listener

This commit is contained in:
Daniella / Tove 2022-07-06 01:08:21 +02:00
parent 37f08b5178
commit c572fa5992

View file

@ -93,7 +93,9 @@ public class EventListener {
}
}
try {
res.call((Response) method.invoke(catcher, args));
Response resp = (Response) method.invoke(catcher, args);
if(resp != null)
res.call(resp);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
e.printStackTrace();
}