From bcfcf721a4ac534d9e01a9182d7bd289dfde8c5b Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 23 Feb 2012 14:29:35 +0100 Subject: [PATCH] allow disconnecting from disposed message bus (EA-33973 - assert: MessageBusImpl.checkNotDisposed) --- .../src/com/intellij/util/messages/impl/MessageBusImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/util/src/com/intellij/util/messages/impl/MessageBusImpl.java b/platform/util/src/com/intellij/util/messages/impl/MessageBusImpl.java index ba9ef4358c9a..3ccd4b657435 100644 --- a/platform/util/src/com/intellij/util/messages/impl/MessageBusImpl.java +++ b/platform/util/src/com/intellij/util/messages/impl/MessageBusImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -239,10 +239,10 @@ public class MessageBusImpl implements MessageBus { } public void notifyConnectionTerminated(final MessageBusConnectionImpl connection) { - checkNotDisposed(); for (List topicSubscribers : mySubscribers.values()) { topicSubscribers.remove(connection); } + if (myDisposed) return; final Iterator i = myMessageQueue.get().iterator(); while (i.hasNext()) {