mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Fixed NPEs in the new prompt input code (we should not assume that SA vars will be filled in at all times).
This commit is contained in:
@@ -81,7 +81,7 @@ public class InputConfirm extends InputSyncronizedBase {
|
|||||||
defaultYes = defaultYes0;
|
defaultYes = defaultYes0;
|
||||||
result = defaultYes0;
|
result = defaultYes0;
|
||||||
this.sa = sa0;
|
this.sa = sa0;
|
||||||
this.card = sa.getView().getHostCard();
|
this.card = sa != null ? sa.getView().getHostCard() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputConfirm(final PlayerControllerHuman controller, String message0, CardView card0) {
|
public InputConfirm(final PlayerControllerHuman controller, String message0, CardView card0) {
|
||||||
|
|||||||
@@ -36,8 +36,10 @@ public abstract class InputSelectManyBase<T extends GameEntity> extends InputSyn
|
|||||||
protected InputSelectManyBase(final PlayerControllerHuman controller, final int min, final int max, final SpellAbility sa0) {
|
protected InputSelectManyBase(final PlayerControllerHuman controller, final int min, final int max, final SpellAbility sa0) {
|
||||||
this(controller,min,max);
|
this(controller,min,max);
|
||||||
this.sa = sa0;
|
this.sa = sa0;
|
||||||
|
if (sa0 != null) {
|
||||||
this.card = sa0.getView().getHostCard();
|
this.card = sa0.getView().getHostCard();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected InputSelectManyBase(final PlayerControllerHuman controller, final int min, final int max, final CardView card0) {
|
protected InputSelectManyBase(final PlayerControllerHuman controller, final int min, final int max, final CardView card0) {
|
||||||
this(controller,min,max);
|
this(controller,min,max);
|
||||||
|
|||||||
Reference in New Issue
Block a user