Fix EA-210182, check for context validity

This commit is contained in:
Yan Zhulanow
2020-03-05 20:57:04 +09:00
parent b756e18962
commit c8bad15ba9
@@ -172,7 +172,7 @@ abstract class KtCodeFragment(
override fun getExceptionHandler() = exceptionHandler override fun getExceptionHandler() = exceptionHandler
fun getContextContainingFile(): KtFile? { fun getContextContainingFile(): KtFile? {
return getOriginalContext()?.containingKtFile return getOriginalContext()?.takeIf { it.isValid }?.containingKtFile
} }
fun getOriginalContext(): KtElement? { fun getOriginalContext(): KtElement? {