Fixed some possible NPEs.

This commit is contained in:
MobiusDev 2017-08-31 18:47:22 +00:00
parent b92d8229d6
commit 8758b8ec5b
2 changed files with 3 additions and 3 deletions

View File

@ -109,8 +109,8 @@ public final class PriestOfBlessing extends AbstractNpcAI
{ {
if (player.getAdena() >= PRICE_VOICE) if (player.getAdena() >= PRICE_VOICE)
{ {
final String value = player.getVariables().getString("PriestOfBlessing_voice"); final String value = player.getVariables().getString("PriestOfBlessing_voice", "");
final long _reuse_time = value == "" ? 0 : Long.parseLong(value); final long _reuse_time = value.isEmpty() ? 0 : Long.parseLong(value);
if (System.currentTimeMillis() > _reuse_time) if (System.currentTimeMillis() > _reuse_time)
{ {

View File

@ -150,7 +150,7 @@ public final class SubClassSkills extends Quest
for (int j = Config.MAX_SUBCLASS; j > 0; j--) for (int j = Config.MAX_SUBCLASS; j > 0; j--)
{ {
qName = VARS[i] + j; qName = VARS[i] + j;
qValue = player.getVariables().getString(qName); qValue = player.getVariables().getString(qName, "");
if ((qValue == null) || qValue.isEmpty()) if ((qValue == null) || qValue.isEmpty())
{ {
continue; continue;