Merge pull request #2103 from olee/patch-1
Fix possible crash in EventBus
This commit is contained in:
commit
605457deec
|
@ -121,6 +121,8 @@ public class EventBus implements IEventExceptionHandler
|
|||
public void unregister(Object object)
|
||||
{
|
||||
ArrayList<IEventListener> list = listeners.remove(object);
|
||||
if (list == null)
|
||||
return;
|
||||
for (IEventListener listener : list)
|
||||
{
|
||||
ListenerList.unregisterAll(busID, listener);
|
||||
|
|
Loading…
Reference in New Issue