Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Sync on the proper variable.

  • Loading branch information...
commit ab1ad54e4b855a3b059bb06100dd1f3500a0e7e0 1 parent f9de3b5
@grum authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/nl/grum/microcraft/EventDispatch.java
View
4 src/main/java/nl/grum/microcraft/EventDispatch.java
@@ -12,14 +12,14 @@
public <L> void register(Class<? extends Event<L>> eventClass, L listener) {
List<L> listeners = listenersOf(eventClass);
- synchronized (listener) {
+ synchronized (listeners) {
listeners.add(listener);
}
}
public <L> void unregister(Class<? extends Event<L>> eventClass, L listener) {
List<L> listeners = listenersOf(eventClass);
- synchronized (listener) {
+ synchronized (listeners) {
listeners.remove(listener);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.