diff --git a/src/main/scala/li/cil/oc/client/Manual.scala b/src/main/scala/li/cil/oc/client/Manual.scala index cb885525a9..e623e6ba04 100644 --- a/src/main/scala/li/cil/oc/client/Manual.scala +++ b/src/main/scala/li/cil/oc/client/Manual.scala @@ -86,7 +86,13 @@ object Manual extends ManualAPI { override def contentFor(path: String): java.lang.Iterable[String] = { val cleanPath = com.google.common.io.Files.simplifyPath(path) - val language = FMLCommonHandler.instance.getCurrentLanguage + val language = try { + FMLCommonHandler.instance.getCurrentLanguage + } catch { + case t: Throwable => + OpenComputers.log.warn("The game threw an error when querying current language.", t) + "en_US" + } contentForWithRedirects(cleanPath.replaceAll(LanguageKey, language)). orElse(contentForWithRedirects(cleanPath.replaceAll(LanguageKey, FallbackLanguage))). orNull