check is disposed (correct solution will be later (we should not hold disposed stores))

This commit is contained in:
Vladimir Krivosheev
2015-08-26 17:50:14 +02:00
parent 549bbfd01c
commit ea313a8e57
@@ -67,6 +67,10 @@ class StoreAwareProjectManager(virtualFileManager: VirtualFileManager, progressM
if (!changes.isEmpty()) {
runBatchUpdate(project.getMessageBus()) {
for ((store, storages) in changes.entrySet()) {
if ((store.storageManager as? StateStorageManagerImpl)?.componentManager?.isDisposed() ?: false) {
continue
}
@suppress("UNCHECKED_CAST")
if (reloadStore(storages as Set<StateStorage>, store, false) == ReloadComponentStoreStatus.RESTART_AGREED) {
projectsToReload.add(project)