From 39a88cd4d136aced5036fd01205c0d817a3cfab8 Mon Sep 17 00:00:00 2001 From: Maxmtg Date: Mon, 17 Jun 2013 07:33:50 +0000 Subject: [PATCH] fix NPE in public SoundEffectType visit(GameEventCardChangeZone event) --- src/main/java/forge/sound/EventVisualizer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/forge/sound/EventVisualizer.java b/src/main/java/forge/sound/EventVisualizer.java index cbd228aa644..219f827b72a 100644 --- a/src/main/java/forge/sound/EventVisualizer.java +++ b/src/main/java/forge/sound/EventVisualizer.java @@ -38,7 +38,7 @@ public class EventVisualizer extends IGameEventVisitor.Base { public SoundEffectType visit(GameEventCardDestroyed event) { return SoundEffectType.Destroy; } public SoundEffectType visit(GameEventCardEquipped event) { return SoundEffectType.Equip; } public SoundEffectType visit(GameEventCardChangeZone event) { - ZoneType from = event.from.getZoneType(); + ZoneType from = event.from == null ? null : event.from.getZoneType(); ZoneType to = event.to.getZoneType(); if( from == ZoneType.Library && to == ZoneType.Hand) return SoundEffectType.Draw;