mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Merge branch 'master' into 'master'
Try-catch in ItemManager to catch odd NPE flukes in mobile deck editor (as recommended by Kev) See merge request core-developers/forge!5794
This commit is contained in:
@@ -528,6 +528,7 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
if (pool == null) {
|
if (pool == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
pool.add(item, qty);
|
pool.add(item, qty);
|
||||||
if (isUnfiltered()) {
|
if (isUnfiltered()) {
|
||||||
model.addItem(item, qty);
|
model.addItem(item, qty);
|
||||||
@@ -535,6 +536,9 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
List<T> items = new ArrayList<>();
|
List<T> items = new ArrayList<>();
|
||||||
items.add(item);
|
items.add(item);
|
||||||
updateView(false, items);
|
updateView(false, items);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addItems(Iterable<Entry<T, Integer>> itemsToAdd) {
|
public void addItems(Iterable<Entry<T, Integer>> itemsToAdd) {
|
||||||
|
|||||||
Reference in New Issue
Block a user