MagicCardDefinition.add throws RuntimeException ifi null is passed
parent
f07176f36e
commit
4de9d4616b
|
@ -256,7 +256,9 @@ public class MagicCardDefinition {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(final Object obj) {
|
public void add(final Object obj) {
|
||||||
if (obj instanceof MagicSpellCardEvent) {
|
if (obj == null) {
|
||||||
|
throw new RuntimeException("MagicCardDefinition.add passed null");
|
||||||
|
} else if (obj instanceof MagicSpellCardEvent) {
|
||||||
final MagicSpellCardEvent cevent = (MagicSpellCardEvent)obj;
|
final MagicSpellCardEvent cevent = (MagicSpellCardEvent)obj;
|
||||||
setCardEvent(cevent);
|
setCardEvent(cevent);
|
||||||
cevent.setCardIndex(index);
|
cevent.setCardIndex(index);
|
||||||
|
|
Loading…
Reference in New Issue