- Added a NPE check to sharesCreatureTypeWith.

This commit is contained in:
Sloth
2012-02-10 18:16:09 +00:00
parent 8f5d64ba9d
commit b518ce2ed6

View File

@@ -7337,6 +7337,10 @@ public class Card extends GameEntity implements Comparable<Card> {
*/
public final boolean sharesCreatureTypeWith(final Card c1) {
if (c1 == null) {
return false;
}
for (final String type : this.getType()) {
if (type.equals("AllCreatureTypes") && c1.hasACreatureType()) {
return true;