forked from External/mage
* Fixed null pointer exception problems in client.
This commit is contained in:
parent
4d60685c05
commit
3cc157bc2c
2 changed files with 25 additions and 27 deletions
|
|
@ -22,7 +22,6 @@ import javax.swing.JPopupMenu;
|
||||||
import javax.swing.Popup;
|
import javax.swing.Popup;
|
||||||
import javax.swing.PopupFactory;
|
import javax.swing.PopupFactory;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
import mage.cards.MageCard;
|
import mage.cards.MageCard;
|
||||||
import mage.cards.action.ActionCallback;
|
import mage.cards.action.ActionCallback;
|
||||||
import mage.cards.action.TransferData;
|
import mage.cards.action.TransferData;
|
||||||
|
|
@ -463,7 +462,7 @@ public class MageActionCallback implements ActionCallback {
|
||||||
int notches = e.getWheelRotation();
|
int notches = e.getWheelRotation();
|
||||||
if (enlargedWindowState != EnlargedWindowState.CLOSED) {
|
if (enlargedWindowState != EnlargedWindowState.CLOSED) {
|
||||||
// same move direction will be ignored, opposite direction closes the enlarged window
|
// same move direction will be ignored, opposite direction closes the enlarged window
|
||||||
if (new Date().getTime() - enlargeredViewOpened.getTime() > 1000) {
|
if (enlargeredViewOpened != null && new Date().getTime() - enlargeredViewOpened.getTime() > 1000) {
|
||||||
// if the opening is back more than 1 seconds close anyway
|
// if the opening is back more than 1 seconds close anyway
|
||||||
hideEnlargedCard();
|
hideEnlargedCard();
|
||||||
handleOverNewView(transferData);
|
handleOverNewView(transferData);
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ package mage.view;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.ObjectColor;
|
import mage.ObjectColor;
|
||||||
import mage.abilities.Abilities;
|
import mage.abilities.Abilities;
|
||||||
|
|
@ -66,7 +65,7 @@ public class CardView extends SimpleCardView {
|
||||||
protected List<String> rules;
|
protected List<String> rules;
|
||||||
protected String power;
|
protected String power;
|
||||||
protected String toughness;
|
protected String toughness;
|
||||||
protected String loyalty;
|
protected String loyalty = "";
|
||||||
protected String startingLoyalty;
|
protected String startingLoyalty;
|
||||||
protected EnumSet<CardType> cardTypes;
|
protected EnumSet<CardType> cardTypes;
|
||||||
protected List<String> subTypes;
|
protected List<String> subTypes;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue