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
|
||||
protected void onStop() {
|
||||
// Clear current Mana cost being paid for SA
|
||||
saPaidFor.setManaCostBeingPaid(null);
|
||||
player.popPaidForSA();
|
||||
if (!isFinished()) {
|
||||
// Clear current Mana cost being paid for SA
|
||||
saPaidFor.setManaCostBeingPaid(null);
|
||||
player.popPaidForSA();
|
||||
|
||||
if (wasFloatingMana) { //hide mana pool if it was shown due to floating mana
|
||||
getController().getGui().hideManaPool(PlayerView.get(player));
|
||||
if (wasFloatingMana) { //hide mana pool if it was shown due to floating mana
|
||||
getController().getGui().hideManaPool(PlayerView.get(player));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,6 @@ public abstract class InputSyncronizedBase extends InputBase implements InputSyn
|
||||
}
|
||||
|
||||
protected final void stop() {
|
||||
onStop();
|
||||
|
||||
// ensure input won't accept any user actions.
|
||||
FThreads.invokeInEdtNowOrLater(new Runnable() {
|
||||
@Override
|
||||
@@ -46,6 +44,8 @@ public abstract class InputSyncronizedBase extends InputBase implements InputSyn
|
||||
}
|
||||
});
|
||||
|
||||
onStop();
|
||||
|
||||
// thread irrelevant
|
||||
if (getController().getInputQueue().getInput() != null) {
|
||||
getController().getInputQueue().removeInput(InputSyncronizedBase.this);
|
||||
|
||||
Reference in New Issue
Block a user