mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Fix potential NPE.
This commit is contained in:
@@ -3484,7 +3484,11 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
|||||||
public final void setCopiedPermanent(final Card c) {
|
public final void setCopiedPermanent(final Card c) {
|
||||||
if (copiedPermanent == c) { return; }
|
if (copiedPermanent == c) { return; }
|
||||||
copiedPermanent = c;
|
copiedPermanent = c;
|
||||||
currentState.setOracleText(c.getOracleText());
|
if(c != null)
|
||||||
|
currentState.setOracleText(c.getOracleText());
|
||||||
|
//Could fetch the card rules oracle text in an "else" clause here,
|
||||||
|
//but CardRules isn't aware of the card's state. May be better to
|
||||||
|
//just stash the original oracle text if this comes up.
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isCopiedSpell() {
|
public final boolean isCopiedSpell() {
|
||||||
|
|||||||
Reference in New Issue
Block a user