Fix NPE if root is null
This commit is contained in:
kordum committed 2017-06-22 14:53:53 +03:00
1 parent 7d269684da
commit dcd08c4d37
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ buildscript {
apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin"
apply plugin: 'forge'
version = "2.0.15"
version = "2.0.16"
if (System.getenv("BUILD_NUMBER") != null) {
version = version + "-" + System.getenv("BUILD_NUMBER")
}
@@ -92,6 +92,10 @@ public class ManagerGenetics extends ManagerBase {
}
public BreedingSystem getSystem(ISpeciesRoot root) {
// Fix NPE
if (root == null) {
return null;
}
return getSystem(root.getUID());
}