Fixed possible deleteInstanceTime NPE.

This commit is contained in:
MobiusDev 2017-10-31 10:42:37 +00:00
parent b276cf2695
commit 37e5ece16d
4 changed files with 16 additions and 4 deletions

View File

@ -625,7 +625,10 @@ public final class InstanceManager implements IGameXmlReader
ps.setInt(1, player.getObjectId()); ps.setInt(1, player.getObjectId());
ps.setInt(2, id); ps.setInt(2, id);
ps.execute(); ps.execute();
_playerInstanceTimes.get(player.getObjectId()).remove(id); if (_playerInstanceTimes.get(player.getObjectId()) != null)
{
_playerInstanceTimes.get(player.getObjectId()).remove(id);
}
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -625,7 +625,10 @@ public final class InstanceManager implements IGameXmlReader
ps.setInt(1, player.getObjectId()); ps.setInt(1, player.getObjectId());
ps.setInt(2, id); ps.setInt(2, id);
ps.execute(); ps.execute();
_playerInstanceTimes.get(player.getObjectId()).remove(id); if (_playerInstanceTimes.get(player.getObjectId()) != null)
{
_playerInstanceTimes.get(player.getObjectId()).remove(id);
}
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -625,7 +625,10 @@ public final class InstanceManager implements IGameXmlReader
ps.setInt(1, player.getObjectId()); ps.setInt(1, player.getObjectId());
ps.setInt(2, id); ps.setInt(2, id);
ps.execute(); ps.execute();
_playerInstanceTimes.get(player.getObjectId()).remove(id); if (_playerInstanceTimes.get(player.getObjectId()) != null)
{
_playerInstanceTimes.get(player.getObjectId()).remove(id);
}
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -625,7 +625,10 @@ public final class InstanceManager implements IGameXmlReader
ps.setInt(1, player.getObjectId()); ps.setInt(1, player.getObjectId());
ps.setInt(2, id); ps.setInt(2, id);
ps.execute(); ps.execute();
_playerInstanceTimes.get(player.getObjectId()).remove(id); if (_playerInstanceTimes.get(player.getObjectId()) != null)
{
_playerInstanceTimes.get(player.getObjectId()).remove(id);
}
} }
catch (Exception e) catch (Exception e)
{ {