From d7107533b3db16cce4768c49bf53a23317430173 Mon Sep 17 00:00:00 2001 From: melvin Date: Tue, 28 Jun 2011 15:06:14 +0800 Subject: [PATCH] added assert --- src/magic/model/choice/MagicPlayChoiceResult.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/magic/model/choice/MagicPlayChoiceResult.java b/src/magic/model/choice/MagicPlayChoiceResult.java index 9cefa1dda3..3e5cace9cf 100644 --- a/src/magic/model/choice/MagicPlayChoiceResult.java +++ b/src/magic/model/choice/MagicPlayChoiceResult.java @@ -20,8 +20,9 @@ public class MagicPlayChoiceResult implements MagicMappable { public Object map(final MagicGame game) { if (this==PASS) { return PASS; - } - return new MagicPlayChoiceResult((MagicSource)source.map(game),activation); + } else { + return new MagicPlayChoiceResult((MagicSource)source.map(game),activation); + } } @Override @@ -29,6 +30,7 @@ public class MagicPlayChoiceResult implements MagicMappable { if (this==PASS) { return "pass"; } else { + assert source != null; return source.getName(); } }