mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 04:09:54 -08:00
Fixed some handling to possible NPEs.
This commit is contained in:
parent
e7cb9d567d
commit
bc9dca4d8a
3 changed files with 11 additions and 3 deletions
|
|
@ -701,7 +701,11 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
|
|||
updateGameStatePriority("getAmount", game);
|
||||
game.fireGetAmountEvent(playerId, message, min, max);
|
||||
waitForIntegerResponse(game);
|
||||
return response.getInteger();
|
||||
if (response != null) {
|
||||
return response.getInteger();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue