Parcelize: Fix NPE on availability check

This commit is contained in:
Yan Zhulanow
2020-09-28 18:30:05 +09:00
parent 8c423729e4
commit af1ed77d15
@@ -32,6 +32,6 @@ object ParcelizeAvailability {
val path = ExternalSystemApiUtil.getExternalProjectPath(module) ?: return false
val externalProjectInfo = ExternalSystemUtil.getExternalProjectInfo(module.project, GradleConstants.SYSTEM_ID, path) ?: return false
val moduleData = GradleProjectResolverUtil.findModule(externalProjectInfo.externalProjectStructure, path) ?: return false
return moduleData.getCopyableUserData(ParcelizeProjectResolverExtension.KEY).isEnabled
return moduleData.getCopyableUserData(ParcelizeProjectResolverExtension.KEY)?.isEnabled ?: false
}
}