mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Fix crash with The Monarch
This commit is contained in:
@@ -15,7 +15,7 @@ public class ImageUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static PaperCard getPaperCardFromImageKey(String key) {
|
public static PaperCard getPaperCardFromImageKey(String key) {
|
||||||
if ( key == null ) {
|
if (key == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ public class ImageCache {
|
|||||||
|
|
||||||
IPaperCard ipc = null;
|
IPaperCard ipc = null;
|
||||||
boolean altState = imageKey.endsWith(ImageKeys.BACKFACE_POSTFIX);
|
boolean altState = imageKey.endsWith(ImageKeys.BACKFACE_POSTFIX);
|
||||||
if(altState)
|
if (altState)
|
||||||
imageKey = imageKey.substring(0, imageKey.length() - ImageKeys.BACKFACE_POSTFIX.length());
|
imageKey = imageKey.substring(0, imageKey.length() - ImageKeys.BACKFACE_POSTFIX.length());
|
||||||
if (imageKey.startsWith(ImageKeys.CARD_PREFIX)) {
|
if (imageKey.startsWith(ImageKeys.CARD_PREFIX)) {
|
||||||
PaperCard pc = ImageUtil.getPaperCardFromImageKey(imageKey);
|
PaperCard pc = ImageUtil.getPaperCardFromImageKey(imageKey);
|
||||||
@@ -165,7 +165,7 @@ public class ImageCache {
|
|||||||
if (StringUtils.isBlank(imageKey)) {
|
if (StringUtils.isBlank(imageKey)) {
|
||||||
return _defaultImage;
|
return _defaultImage;
|
||||||
}
|
}
|
||||||
} else if (imageKey.startsWith(ImageKeys.TOKEN_PREFIX)) {
|
} else if (imageKey.startsWith(ImageKeys.TOKEN_PREFIX) && cardView.isToken()) {
|
||||||
ipc = ImageUtil.getPaperTokenFromImageKey(imageKey);
|
ipc = ImageUtil.getPaperTokenFromImageKey(imageKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user