Fixed probable getAllyCrestId NPE.

Contributed by Sahar.
This commit is contained in:
MobiusDevelopment
2019-10-28 20:39:29 +00:00
parent f7fe3534c3
commit bf4e116a19
18 changed files with 35 additions and 173 deletions

View File

@@ -4250,20 +4250,12 @@ public class PlayerInstance extends Playable
@Override
public int getAllyId()
{
if (_clan == null)
{
return 0;
}
return _clan.getAllyId();
return _clan == null ? 0 : _clan.getAllyId();
}
public int getAllyCrestId()
{
if ((_clanId == 0) || (_clan == null) || (_clan.getAllyId() == 0))
{
return 0;
}
return _clan.getAllyCrestId();
return getAllyId() == 0 ? 0 : _clan.getAllyCrestId();
}
/**