mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- A better fix for the custom booster draft NPEing
This commit is contained in:
@@ -134,6 +134,9 @@ public class ImageCache {
|
|||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public static BufferedImage getOriginalImage(String imageKey, boolean useDefaultIfNotFound) {
|
public static BufferedImage getOriginalImage(String imageKey, boolean useDefaultIfNotFound) {
|
||||||
|
if (null == imageKey) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
boolean altState = imageKey.endsWith(ImageKeys.BACKFACE_POSTFIX);
|
boolean altState = imageKey.endsWith(ImageKeys.BACKFACE_POSTFIX);
|
||||||
if(altState)
|
if(altState)
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ public enum CDetail implements ICDoc {
|
|||||||
* @param c   Card object
|
* @param c   Card object
|
||||||
*/
|
*/
|
||||||
public void showCard(final Card c) {
|
public void showCard(final Card c) {
|
||||||
|
if (null == c) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
view.getLblFlipcard().setVisible(c != null && (c.isDoubleFaced() || c.isFlipCard() || c.isFaceDown() && Singletons.getControl().mayShowCard(c)));
|
view.getLblFlipcard().setVisible(c != null && (c.isDoubleFaced() || c.isFlipCard() || c.isFaceDown() && Singletons.getControl().mayShowCard(c)));
|
||||||
view.getPnlDetail().setCard(c);
|
view.getPnlDetail().setCard(c);
|
||||||
view.getParentCell().repaintSelf();
|
view.getParentCell().repaintSelf();
|
||||||
|
|||||||
Reference in New Issue
Block a user