mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Fix crash when closing Spell Shop
This commit is contained in:
@@ -96,6 +96,10 @@ public enum FSkin {
|
|||||||
this.comp = comp0;
|
this.comp = comp0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDisposed() {
|
||||||
|
return this.comp == null;
|
||||||
|
}
|
||||||
|
|
||||||
public SkinColor getForeground() {
|
public SkinColor getForeground() {
|
||||||
return this.foreground;
|
return this.foreground;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public final class ItemListView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
this.table.addFocusListener(new FocusListener() {
|
this.table.addFocusListener(new FocusListener() {
|
||||||
@Override
|
@Override
|
||||||
public void focusLost(FocusEvent e) {
|
public void focusLost(FocusEvent e) {
|
||||||
if (!e.isTemporary()) {
|
if (!e.isTemporary() && !skin.isDisposed()) {
|
||||||
skin.setSelectionBackground(FSkin.getColor(FSkin.Colors.CLR_INACTIVE));
|
skin.setSelectionBackground(FSkin.getColor(FSkin.Colors.CLR_INACTIVE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user