mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Fix crash on payment with Channel
This commit is contained in:
@@ -66,12 +66,14 @@ public abstract class InputPayMana extends InputSyncronizedBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
// Clear current Mana cost being paid for SA
|
if (!isFinished()) {
|
||||||
saPaidFor.setManaCostBeingPaid(null);
|
// Clear current Mana cost being paid for SA
|
||||||
player.popPaidForSA();
|
saPaidFor.setManaCostBeingPaid(null);
|
||||||
|
player.popPaidForSA();
|
||||||
|
|
||||||
if (wasFloatingMana) { //hide mana pool if it was shown due to floating mana
|
if (wasFloatingMana) { //hide mana pool if it was shown due to floating mana
|
||||||
getController().getGui().hideManaPool(PlayerView.get(player));
|
getController().getGui().hideManaPool(PlayerView.get(player));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ public abstract class InputSyncronizedBase extends InputBase implements InputSyn
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected final void stop() {
|
protected final void stop() {
|
||||||
onStop();
|
|
||||||
|
|
||||||
// ensure input won't accept any user actions.
|
// ensure input won't accept any user actions.
|
||||||
FThreads.invokeInEdtNowOrLater(new Runnable() {
|
FThreads.invokeInEdtNowOrLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -46,6 +44,8 @@ public abstract class InputSyncronizedBase extends InputBase implements InputSyn
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onStop();
|
||||||
|
|
||||||
// thread irrelevant
|
// thread irrelevant
|
||||||
if (getController().getInputQueue().getInput() != null) {
|
if (getController().getInputQueue().getInput() != null) {
|
||||||
getController().getInputQueue().removeInput(InputSyncronizedBase.this);
|
getController().getInputQueue().removeInput(InputSyncronizedBase.this);
|
||||||
|
|||||||
Reference in New Issue
Block a user