mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Prevent crash in CardDetailPanel::setCard
This commit is contained in:
@@ -178,8 +178,13 @@ public class CardDetailPanel extends SkinnedPanel {
|
|||||||
setInfoLabel.setBorder(null);
|
setInfoLabel.setBorder(null);
|
||||||
cdArea.setText("");
|
cdArea.setText("");
|
||||||
|
|
||||||
|
if (card == null) {
|
||||||
|
updateBorder(null, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final CardStateView state = card.getState(isInAltState);
|
final CardStateView state = card.getState(isInAltState);
|
||||||
if (card == null || state == null) {
|
if (state == null) {
|
||||||
updateBorder(null, false);
|
updateBorder(null, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user