Fix NPE in getBiomeByName (bdew/gendustry#22)

This commit is contained in:
bdew committed 2014-05-13 02:15:57 +03:00
1 parent 2a995f1c05
commit 49a2f0baec
1 file changed
+1 -1
+1 -1
View File
@@ -55,7 +55,7 @@ object Misc {
def filterType[T](from: Iterable[_], cls: Class[T]) = from.filter(cls.isInstance).asInstanceOf[Iterable[T]]
def getBiomeByName(name: String) = BiomeGenBase.biomeList.find(_.biomeName == name).getOrElse(null)
def getBiomeByName(name: String) = BiomeGenBase.biomeList.find(x => x != null && x.biomeName == name).getOrElse(null)
def haveModVersion(spec: String): Boolean = {
val req = VersionParser.parseVersionReference(spec)