mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Basic NPE prevention in showCard, please review (not sure if there's a better way to prevent this NPE that would be more desirable).
This commit is contained in:
@@ -62,6 +62,10 @@ public enum CPicture implements ICDoc {
|
||||
*
|
||||
*/
|
||||
public void showCard(final Card c, boolean showFlipped) {
|
||||
if (null == c) {
|
||||
return;
|
||||
}
|
||||
|
||||
currentCard = c;
|
||||
displayedState = c.getCurState();
|
||||
flipIndicator.setVisible(isCurrentCardFlippable());
|
||||
|
||||
Reference in New Issue
Block a user