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,8 +625,11 @@ 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();
if (_playerInstanceTimes.get(player.getObjectId()) != null)
{
_playerInstanceTimes.get(player.getObjectId()).remove(id); _playerInstanceTimes.get(player.getObjectId()).remove(id);
} }
}
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Could not delete character instance reenter data: ", e); LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Could not delete character instance reenter data: ", e);

View File

@ -625,8 +625,11 @@ 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();
if (_playerInstanceTimes.get(player.getObjectId()) != null)
{
_playerInstanceTimes.get(player.getObjectId()).remove(id); _playerInstanceTimes.get(player.getObjectId()).remove(id);
} }
}
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Could not delete character instance reenter data: ", e); LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Could not delete character instance reenter data: ", e);

View File

@ -625,8 +625,11 @@ 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();
if (_playerInstanceTimes.get(player.getObjectId()) != null)
{
_playerInstanceTimes.get(player.getObjectId()).remove(id); _playerInstanceTimes.get(player.getObjectId()).remove(id);
} }
}
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Could not delete character instance reenter data: ", e); LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Could not delete character instance reenter data: ", e);

View File

@ -625,8 +625,11 @@ 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();
if (_playerInstanceTimes.get(player.getObjectId()) != null)
{
_playerInstanceTimes.get(player.getObjectId()).remove(id); _playerInstanceTimes.get(player.getObjectId()).remove(id);
} }
}
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Could not delete character instance reenter data: ", e); LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Could not delete character instance reenter data: ", e);