Fixed a null pointer error in user.

This commit is contained in:
LevelX2 2017-02-06 21:20:55 +01:00
parent b3597d64a0
commit 1dbd24cde6

View file

@ -37,7 +37,6 @@ import java.util.Map.Entry;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import mage.cards.decks.Deck; import mage.cards.decks.Deck;
import mage.constants.ManaType; import mage.constants.ManaType;
import mage.constants.TableState; import mage.constants.TableState;
@ -247,8 +246,10 @@ public class User {
public void fireCallback(final ClientCallback call) { public void fireCallback(final ClientCallback call) {
if (isConnected()) { if (isConnected()) {
SessionManager.getInstance().getSession(sessionId).fireCallback(call); Session session = SessionManager.getInstance().getSession(sessionId);
if (session != null) {
session.fireCallback(call);
}
} }
} }