Fix EA-80764. Do not try to get the resource manager for the disposed module

(cherry picked from commit c3bd243)
(cherry picked from commit cddcf02)
This commit is contained in:
Yan Zhulanow
2016-05-19 21:23:33 +03:00
parent e0243fd568
commit 2cd0e9c8d8
@@ -85,7 +85,7 @@ class AndroidPsiTreeChangePreprocessor : PsiTreeChangePreprocessor, SimpleModifi
val module = projectFileIndex.getModuleForFile(xmlFile.virtualFile)
?: (element.parent as? PsiDirectory)?.let { projectFileIndex.getModuleForFile(it.virtualFile) }
if (module != null) {
if (module != null && !module.isDisposed) {
val resourceManager = AndroidLayoutXmlFileManager.getInstance(module) ?: return false
val resDirectories = resourceManager.getAllModuleResDirectories()
val baseDirectory = xmlFile.parent?.parent?.virtualFile