Fixed probable PlayerStat SubClassHolder NPE.

This commit is contained in:
MobiusDevelopment
2022-02-15 22:18:18 +00:00
parent 3ac1a738ed
commit 72d6f38f82
23 changed files with 132 additions and 23 deletions

View File

@@ -391,7 +391,11 @@ public class PlayerStat extends PlayableStat
}
if (getActiveChar().isSubClassActive())
{
return getActiveChar().getSubClasses().get(getActiveChar().getClassIndex()).getLevel();
final SubClassHolder holder = getActiveChar().getSubClasses().get(getActiveChar().getClassIndex());
if (holder != null)
{
return holder.getLevel();
}
}
return super.getLevel();
}