mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Fix NPE in Game
This commit is contained in:
parent
a3a906095c
commit
0cb98867ee
@ -91,8 +91,11 @@ public abstract class Game implements Runnable {
|
|||||||
|
|
||||||
GameTeam team = this.getTeamForHabbo(habbo);
|
GameTeam team = this.getTeamForHabbo(habbo);
|
||||||
if (team != null && team.isMember(habbo)) {
|
if (team != null && team.isMember(habbo)) {
|
||||||
|
if (habbo.getHabboInfo().getGamePlayer() != null) {
|
||||||
team.removeMember(habbo.getHabboInfo().getGamePlayer());
|
team.removeMember(habbo.getHabboInfo().getGamePlayer());
|
||||||
habbo.getHabboInfo().getGamePlayer().reset();
|
habbo.getHabboInfo().getGamePlayer().reset();
|
||||||
|
}
|
||||||
|
|
||||||
habbo.getHabboInfo().setCurrentGame(null);
|
habbo.getHabboInfo().setCurrentGame(null);
|
||||||
habbo.getHabboInfo().setGamePlayer(null);
|
habbo.getHabboInfo().setGamePlayer(null);
|
||||||
habbo.getClient().sendResponse(new GuideSessionPartnerIsPlayingComposer(false));
|
habbo.getClient().sendResponse(new GuideSessionPartnerIsPlayingComposer(false));
|
||||||
@ -101,23 +104,6 @@ public abstract class Game implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
boolean deleteGame = true;
|
|
||||||
for (GameTeam team : this.teams.values())
|
|
||||||
{
|
|
||||||
if (team.getMembers().size() > 0 )
|
|
||||||
{
|
|
||||||
deleteGame = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (deleteGame)
|
|
||||||
{
|
|
||||||
this.room.deleteGame(this);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user